Skip to content

tec: Add a make lint command in the Makefile#2996

Merged
Alkarex merged 1 commit intoFreshRSS:masterfrom
flusio:tec/lint-makefile
May 25, 2020
Merged

tec: Add a make lint command in the Makefile#2996
Alkarex merged 1 commit intoFreshRSS:masterfrom
flusio:tec/lint-makefile

Conversation

@marienfressinaud
Copy link
Copy Markdown
Member

Closes #2722 (I almost forget about this ticket :))

Note: this PR is not urgent so it can wait for the 1.16.1 to be released.

Changes proposed in this pull request:

  • Add php7-xmlwriter and php7-tokenizer to the Alpine image (required by PHP_CodeSniffer)
  • Exclude some config files and extensions path from the linter
  • Add make lint and make lint-fix commands to the Makefile

How to test the feature manually:

Execute make lint and make lint-fix in a console, and verifies it downloads the binaries and executes the linter.

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written (optional if too hard) (N/A)
  • documentation updated

Additional information can be found in the documentation.

Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

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

Looks good enough to me for basic use.

$(PHP) ./bin/phpunit --bootstrap ./tests/bootstrap.php ./tests

.PHONY: lint
lint: bin/phpcs ## Run the linter on the PHP files
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe lint should be a broader target with this one being something like lint-php?

@Alkarex Alkarex added this to the 1.16.1 milestone May 24, 2020
@Alkarex Alkarex merged commit 9788162 into FreshRSS:master May 25, 2020
Frenzie added a commit to Frenzie/FreshRSS that referenced this pull request May 25, 2020
Frenzie added a commit to Frenzie/FreshRSS that referenced this pull request May 25, 2020
Alkarex pushed a commit that referenced this pull request May 28, 2020
@marienfressinaud marienfressinaud deleted the tec/lint-makefile branch April 14, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add make lint and make test targets

3 participants