-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CI: Fix editorconfig #7478
CI: Fix editorconfig #7478
Conversation
@@ -1,6 +1,7 @@ | |||
root = true | |||
|
|||
[*] | |||
charset = utf-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Character set was missing
.editorconfig
Outdated
[{*.yml, *.yaml}] | ||
[*.{yml,yaml,md,json}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was invalid and incomplete
.editorconfig
Outdated
@@ -10,5 +11,5 @@ trim_trailing_whitespace = true | |||
[tests/Fixtures/**] | |||
trim_trailing_whitespace = false | |||
|
|||
[{*.yml, *.yaml}] | |||
[*.{yml,yaml,md,json}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all existing files following this rule. Mind to apply it first ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about the same, but in the end I just thought that it will be applied anyway when files are modified. But maybe applying it all at once is better - for me not a strict requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏃🏻♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 🍏
dev-tools/phpstan/baseline.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file must be left as-is because it's auto-generated and it would lead to constant diffs (previous format would be restored after running the command) or would require to apply formatting in IDE before committing. We need to revert this change and ignore it somehow. I see that people suggest generated_code = true
but I don't see this in official specs. Found the issue where ... = unset
can be used for un-setting requirements. Or maybe we just can revert it and do not apply it again - nobody edits baseline manually anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
If baseline is never opened in an EC-compatible IDE we should not care about it.
BTW I use EC for validation, not only as suggestions. https://github.com/greut/eclint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note
linguist-generated
attribute (in .gitattributes
) could be used to flag generated files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git ls-files --cached \
| git check-attr --stdin --all \
| sed -n -e 's#^\(.\+\): linguist-generated: set$#":!:\1"#p' \
| xargs -- git grep --null --files-with-matches -I -e '.' -- \
| xargs --null -n 1 -- any command ...
Thank you @szepeviktor 🍻 |
some files are still misconfigured. |
I see! |
It's even worse! |
👀