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

Adds erb lint to project #4059

Merged
merged 8 commits into from
Feb 7, 2024

Conversation

elasticspoon
Copy link
Collaborator

This PR adds erb-lint to the project. I also created a bin file to run both rubocop and erb-lint on the whole code base.

I ran the linter on the code base as discussed here

Potentially the rules in erb-lint.yml could be changed. In theory it should be able to run rubocop on the contents for erb tags, however, that was not working for me.

Tests

I did not add tests but the code still passes the full suite.

Adds erb-lint to lint views to bundle.
Adds rake task to do both erb and rubocop linting.
Adds a settings file for erb lint
@elasticspoon elasticspoon force-pushed the adds-erb-lint-to-project branch from 51e8d33 to b4a690b Compare January 24, 2024 21:41
Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Some mistakes look like they crept in.

Also, if we're going to keep this, it probably makes sense to add it to the ruby-lint workflow.

app/views/barcode_items/_barcode_item_lookup.html.erb Outdated Show resolved Hide resolved
app/views/layouts/navigation/_header.html.erb Outdated Show resolved Hide resolved
app/views/layouts/navigation/_header.html.erb Outdated Show resolved Hide resolved
app/views/layouts/navigation/_sidebar.html.erb Outdated Show resolved Hide resolved
app/views/partners/show.html.erb Outdated Show resolved Hide resolved
app/views/profiles/_show.html.erb Outdated Show resolved Hide resolved
app/views/shared/_csv_import_modal.html.erb Show resolved Hide resolved
app/views/static/index.html.erb Outdated Show resolved Hide resolved
app/views/static/index.html.erb Outdated Show resolved Hide resolved
app/views/storage_locations/show.html.erb Outdated Show resolved Hide resolved
@elasticspoon elasticspoon force-pushed the adds-erb-lint-to-project branch from c1287af to 281a5f2 Compare February 2, 2024 21:58
@elasticspoon elasticspoon requested a review from dorner February 2, 2024 22:05
@dorner dorner merged commit 82e19b8 into rubyforgood:main Feb 7, 2024
12 checks passed
@dorner
Copy link
Collaborator

dorner commented Feb 7, 2024

Thanks so much for the addition!

Copy link
Contributor

@elasticspoon: Your PR Adds erb lint to project is part of today's Human Essentials production release: 2024.02.11.
Thank you very much for your contribution!

@elasticspoon elasticspoon deleted the adds-erb-lint-to-project branch February 11, 2024 22:08
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