Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion coder_sniffer/Drupal/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.DisallowShortOpenTag">
<!-- Do not run this sniff on .yml files -->
<exclude-pattern>**/*.yml</exclude-pattern>
Copy link
Collaborator

Choose a reason for hiding this comment

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

any reason why we need **? Other exclusions in this file just use <exclude-pattern>*.tpl.php</exclude-pattern>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Um, no. It's 3 months ago and I can't recall why I did it like that! Maybe I did not look at the rest of the file and just used a pattern that I thought was necessary. Other filepath patterns need a double ** (eg ESLint ignore, I think). I didn't do too much testing at the time, as I had no idea if you would take on this suggestion. Now that I know it's on, I will add test coverage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have removed the double ** and added a good/good.yml file to demonstrate the failure, then the fix.

</rule>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.PHP.UpperCaseConstant"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat">
Expand Down