Skip to content

Commit

Permalink
Fix sniff names that get printed (#49)
Browse files Browse the repository at this point in the history
* Show sniff name when linting PHP

* Update custom sniff error codes

Making these match the sniff name as this is what gets output via the "-s"
flag when something fails a check.
  • Loading branch information
biggianteye authored Aug 6, 2020
1 parent a90e559 commit fb6c746
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ lint-php: ## Check the validness of php
@echo 'linting php...'
@mkdir -p cache
@docker run --rm -it -v $$(pwd):/srv:cached graze/php-alpine:test vendor/bin/phpcs \
-p --warning-severity=0 --cache=cache/phpcs --parallel=10 \
-p --warning-severity=0 --cache=cache/phpcs --parallel=10 -s \
PHP/ examples/
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class IfVariableAssignmentSniff implements Sniff
{
const ERROR_CODE = 'graze.controlStructures.ifVariableAssignment';
const ERROR_CODE = 'Graze.ControlStructures.IfVariableAssignment';
/**
* Registers the tokens that this sniff wants to listen for.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class NegationNoSpacesSniff implements Sniff
{
const ERROR_CODE = 'graze.controlStructures.NegationNoSpaces';
const ERROR_CODE = 'Graze.ControlStructures.NegationNoSpaces';

/**
* @return int[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class NestedTernarySniff implements Sniff
{
const ERROR_CODE = 'graze.controlStructures.nestedTernary';
const ERROR_CODE = 'Graze.ControlStructures.NestedTernary';

/**
* Registers the tokens that this sniff wants to listen for.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class DoubleBlankLineSniff implements Sniff
{
const ERROR_CODE = 'graze.files.doubleBlankLine';
const ERROR_CODE = 'Graze.Files.DoubleBlankLine';

/**
* Registers the tokens that this sniff wants to listen for.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class AbstractClassNamingSniff implements Sniff
{
const ERROR_CODE = 'graze.naming.abstractClass';
const ERROR_CODE = 'Graze.Naming.AbstractClassNaming';

/**
* Registers the tokens that this sniff wants to listen for.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class InterfaceNamingSniff implements Sniff
{
const ERROR_CODE = 'graze.naming.interface';
const ERROR_CODE = 'Graze.Naming.InterfaceNaming';

/**
* Registers the tokens that this sniff wants to listen for.
Expand Down

0 comments on commit fb6c746

Please sign in to comment.