[wp-trac] [WordPress Trac] #47411: Build tools, WPCS: disable line ending check

WordPress Trac noreply at wordpress.org
Sat Sep 14 07:22:57 UTC 2019


#47411: Build tools, WPCS: disable line ending check
------------------------------+-------------------------------
 Reporter:  azaozz            |       Owner:  azaozz
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  5.3
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  2nd-opinion       |     Focuses:  coding-standards
------------------------------+-------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:9 jrf]:
 > This is not an issue with WPCS or even the Core `phpcs.xml.dist`
 ruleset, this is an issue with the setup as used by an individual
 developer.
 >
 > There are two solutions for this - either one of which should be applied
 by the individual developer -. Either solution will fix this, you only
 need to choose which one you prefer to use.

 Thanks for the feedback! I agree, let's revert [45455] then.

 > How git checks out files line-ending wise is a configuration setting of
 the git install on the local machine.
 > By default, on Windows, it will check out files Windows-style and commit
 Unix-style.
 > However, this can easily be changed to `check out as-is`. This is even
 one of the questions during the normal git install procedure on Windows.
 >
 > {{{
 > > git config --global core.autocrlf input
 > }}}
 >
 > Ref: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration -
 section: Formatting and Whitespace
 >
 > Same should be possible for SVN.

 For SVN this seems not as straightforward, as core historically has `svn
 :eol-style` set to `native` for most of the files: #3264, #6065, #12403,
 [17340] [22798], also #45412. This appears to be a [http://svnbook.red-
 bean.com/en/1.7/svn.advanced.props.file-
 portability.html#svn.advanced.props.special.eol-style global setting], I
 haven't found a way to change it locally.

 Re-reading #3264, maybe the original issue where patches could not be
 applied due to different line endings (#3217) is no longer relevant now
 that we have `grunt patch`, and we could set `svn:eol-style` to `LF`
 instead of `native`?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47411#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list