Skip to content

Add sniff RequireExplicitBooleanOperatorPrecedence to the default Youwe coding standard #11

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 3.6.0
### Added
- Rule `Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence` to improve legibility of code.

### Changed
- Increase minimum version of `squizlabs/php_codesniffer` package to guarantee `RequireExplicitBooleanOperatorPrecedence` sniff exists.


## 3.5.1
### Changed
- ESLint conflict between `no-mixed-operators` and `no-extra-parens` resolved.
Expand All @@ -14,12 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
renders the warning/error. This way it's easier to ignore if necessary.

### Removed
- Rule `Generic.Formatting.MultipleStatementAlignment`, since this did not help for the readability
- Rule `Generic.Formatting.MultipleStatementAlignment`, since this did not help for the readability
of the code.

## 3.4.0
### Added
- Constraint for `squizlabs/php_codesniffer` to be compatible with
- Constraint for `squizlabs/php_codesniffer` to be compatible with
magento 2.4.4 and higher coding standards.

## 3.3.1 - 2022-05-27
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": "^7.0 || ^8.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"phpmd/phpmd": "^2.0",
"squizlabs/php_codesniffer": "^3.5.4"
"squizlabs/php_codesniffer": "^3.9.0"
},
"minimum-stability": "stable",
"prefer-stable": true,
Expand Down
1 change: 1 addition & 0 deletions src/GlobalCommon/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
Expand Down