Skip to content
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

Add standard gem for linting #925

Closed
wants to merge 1 commit into from

Conversation

czj
Copy link
Contributor

@czj czj commented Jun 21, 2023

This PR only add standard to the Gemfile.

To lint, run :

standardrb

To lint and automatically fix, run :

standardrb --fix

Applying default code style

You can see there is a major code style difference.

An example PR applies all fixes : #926

GitHub Action

A GitHub Action exists in .github/workflows/lint.yml that you can run.

@minad
Copy link
Member

minad commented Jun 21, 2023

As I suspected before in #924, plain Rubocop will be better for the purposes of Slim. I just checked the Standard gem and it is not a great idea for a project like Slim with a history. I agree that code consistency and coding standards are good, maybe even opinionated and rigid ones as promoted by StandardRB, however it is easier to use them in new projects in contrast to older ones.

@minad minad closed this Jun 21, 2023
@minad minad mentioned this pull request Jun 21, 2023
@czj czj deleted the lint-with-standardrb branch June 22, 2023 08:41
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.

2 participants