forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPCodeSnifferBear: Deduplicate error results
Sets `absolute_line_length` to '0' to disable two different error outputs. Closes coala#1950
- Loading branch information
1 parent
9a27ceb
commit d63635b
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,33 @@ | |
$var = FALSE; | ||
""" | ||
|
||
long_length_test_file = """<?php | ||
/** | ||
* PHP_CodeSniffer tokenizes PHP code and detects violations of a defined set \ | ||
of coding.This is to test that the absoluteLineLength is violated or not. | ||
* PHP version 5 | ||
* | ||
* @category PHP | ||
* @package Your_Package | ||
* @author John Snow <[email protected]> | ||
* @license https://licence.txt LICENSE | ||
* @link http://somelink | ||
*/ | ||
> | ||
""" | ||
|
||
|
||
PHPCodeSnifferBearTest = verify_local_bear( | ||
PHPCodeSnifferBear, | ||
valid_files=(good_file,), | ||
invalid_files=(bad_file,), | ||
tempfile_kwargs={'suffix': '.php'}) | ||
|
||
|
||
PHPCodeSnifferBearLineLengthTest = verify_local_bear( | ||
PHPCodeSnifferBear, | ||
valid_files=(long_length_test_file,), | ||
invalid_files=(), | ||
settings={'max_line_length': '160'}, | ||
tempfile_kwargs={'suffix': '.php'}) |