Skip to content

Extend wildcard files section in editorconfig #4156

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

Closed
wants to merge 3 commits into from

Conversation

petk
Copy link
Member

@petk petk commented May 13, 2019

Changes:

  • Trim trailing whitespace for all files. There isn't really any practical reason to not trim the trailing whitespace in all files. Binary files or phpt files that include trailing whitespace as part of the test will need to be manually set in such environments or by disabling the editorconfig.
  • Add *.ac files (configure.ac), *.re, and *.wsdl files

Listing separate files is a mission impossible for EditorConfig. So, this now limits to changing only spaces and tabs settings for different file extensions. Targeting PHP-7.2 because the EditorConfig is useful setting when checking out different branches. And also adding *.wsdl files as noted in b15bfb9#comments

I'll recheck soon, if these can be applied to all files.

@petk petk added the Quickfix label May 13, 2019
petk referenced this pull request May 13, 2019
These EOL types are part of different environments and not part of the
tests themselves.
@nikic nikic changed the title Extend wildcard files section Extend wildcard files section in editorconfig May 13, 2019
Changes:
- Trim trailing whitespace for all files except patches. There isn't
  really any practical reason to not trim the trailing whitespace in all
  other files. Binary files or phpt files that include trailing
  whitespace as part of the test should be manually set in editors/IDEs
  or by disabling the editorconfig for particular editing.
- Add *.ac, *.d, *.l, *.skl, *.re, *.wsdl, *.dtd, *.html, *.rng, *.xml,
  *.xsd, *.xsl, buildconf, and Makefile* files settings.
@petk petk force-pushed the patch-editorconfig branch from 8532964 to 95c50a9 Compare May 14, 2019 21:22
petk added 2 commits May 18, 2019 00:53
PHP is so special that it needs two kinds of files for the same file
type.
Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine ... binary files are usually not edited in editor.

As a side-note, I wonder if we should change var_dump to print \0 for null bytes, I think that would avoid most of our binary phpt files and also possibly avoid user confusion when dumping mangled properties and similar.

@nikic
Copy link
Member

nikic commented May 31, 2019

By the way, I think we really need to do a full reindent of all phpt tests (and possibly also all php scripts) to spaces in 7.4/master. Updating existing tests is something of a PITA right now because you have about 50/50 chance of running into the wrong indentation.

@php-pulls php-pulls closed this in 65ada39 Jun 9, 2019
@petk petk deleted the patch-editorconfig branch June 9, 2019 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants