Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move php-cs-fixer into the org #143

Merged
merged 1 commit into from
Feb 5, 2025
Merged

move php-cs-fixer into the org #143

merged 1 commit into from
Feb 5, 2025

Conversation

braver
Copy link
Member

@braver braver commented Feb 4, 2025

The original repo has been dead for quite a while. I forked it into the org, and pulled in all the work @gerardroche has done.

@braver braver requested a review from kaste February 4, 2025 09:25
@braver braver self-assigned this Feb 4, 2025
@kaste
Copy link
Contributor

kaste commented Feb 5, 2025

You didn't clone the tags, dude.

@kaste kaste merged commit d118849 into master Feb 5, 2025
2 checks passed
@kaste
Copy link
Contributor

kaste commented Feb 5, 2025

Are you using this?. Well, apparently.

The split_match looks strange

    def split_match(self, match):
        """Extract and return values from match."""
        match, line, col, error, warning, message, near = super().split_match(match)

        line = line + 3
        message = "php-cs-fixer error(s) - " + message

        return match, line, col, error, warning, message, near

It prepends the linter name to each message. Also line is mangled with a constant. We have line_col_base = (1, 1) for that, no?

There is also a fallback

https://github.com/SublimeLinter/SublimeLinter-php-cs-fixer/blob/8f4d64ae915a3ba31f8918da3247b3415e0417ac/linter.py#L83-L85

            config_file = _find_configuration_file(self.view.file_name())
            if not config_file:
                config_file = self.config_file

but self.config_file should not be an attribute. This should raise in practice.

@braver braver deleted the php-cs-fixer branch February 5, 2025 19:44
@braver
Copy link
Member Author

braver commented Feb 5, 2025

You didn't clone the tags, dude.

Ah, rookie mistake, sorry.

Are you using this?

It's been sitting on my work computer with gerardroche's patches applied for over a year and it looks like it works. So, I never really looked at it before (and finally getting around to publishing it properly here was a rush job too as you noticed). Except for those patches the bones of the linter plugin are 8 years old so I bet it's weird in places. Maybe I can find a few minutes between meetings to look at it later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants