You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Max Line Length Rule enhancements and tests (#23)
- Introduced new options for ignoring specific line types (use statements, namespace declarations, docblocks) in the Max Line Length Rule.
- Updated the rule implementation to handle these new options effectively.
- Added multiple test cases to ensure proper functionality of the new features, including backward compatibility for the ignoreUseStatements parameter.
- Created tests to validate detection and ignoring of long lines in docblocks and namespaces based on the new configuration options.
Co-authored-by: Florian Krämer <[email protected]>
Checks that lines do not exceed a specified maximum length. Provides options to exclude files by pattern and ignore use statements.
3
+
Checks that lines do not exceed a specified maximum length. Provides options to exclude files by pattern and ignore specific types of lines (use statements, namespace declarations, docblocks).
4
4
5
-
## Configuration Example
5
+
## Configuration Examples
6
+
7
+
### Using the new array API (recommended)
6
8
7
9
```neon
8
10
-
@@ -11,13 +13,59 @@ Checks that lines do not exceed a specified maximum length. Provides options to
-`maxLineLength`: Maximum allowed line length in characters (default: 80).
21
-
-`excludePatterns`: Array of regex patterns to exclude files from checking (optional).
22
-
-`ignoreUseStatements`: Whether to ignore use statement lines (default: false).
39
+
-`maxLineLength`: Maximum allowed line length in characters (required).
40
+
-`excludePatterns`: Array of regex patterns to exclude files from checking (optional, default: `[]`).
41
+
-`ignoreUseStatements`: Whether to ignore use statement lines (optional, default: `false`). **Note:** This parameter is maintained for backward compatibility. When set to `true`, it takes precedence over the `ignoreLineTypes` array.
42
+
-`ignoreLineTypes`: Array of line types to ignore when checking line length (optional, default: `[]`). Available options:
0 commit comments