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

Fix spec warnings #650

Merged
merged 3 commits into from
Jan 4, 2025
Merged

Fix spec warnings #650

merged 3 commits into from
Jan 4, 2025

Conversation

tagliala
Copy link
Contributor

@tagliala tagliala commented Jan 4, 2025

Fix unassigned variable warning

Fix warning: assigned but unused variable - comp warning

Remove frozen string literals from arb templates

It does not have effect there and outputs a warning when running tests
with RUBYOPTS='-w' rake

warning: 'frozen_string_literal' is ignored after any tokens

Behavior tested in empty.arb template

# frozen_string_literal: true
hello = 'hello'
hello.concat ' world'

Expected: fail
Actual: pass

Close #649

Fix `warning: assigned but unused variable - comp` warning
It does not have effect there and outputs a warning when running tests
with `RUBYOPTS='-w' rake`

```
warning: 'frozen_string_literal' is ignored after any tokens
```

Behavior tested in `empty.arb` template

```
# frozen_string_literal: true
hello = 'hello'
hello.concat ' world'
```

Expected: fail
Actual: pass

Close #649
@tagliala tagliala force-pushed the chore/649-fix-warnings branch from eddb9ce to 2bd6d87 Compare January 4, 2025 10:44
Copy link

codecov bot commented Jan 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.33%. Comparing base (69d762c) to head (eecf75d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #650   +/-   ##
=======================================
  Coverage   94.33%   94.33%           
=======================================
  Files          17       17           
  Lines         459      459           
=======================================
  Hits          433      433           
  Misses         26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Parity with ActiveAdmin to prevent introduction of new warnings

Manually fix a `Lint/UselessAssignment` warning

Ref: activeadmin/activeadmin#8597
@javierjulio javierjulio changed the title Fix warnings Fix spec warnings Jan 4, 2025
@javierjulio javierjulio self-requested a review January 4, 2025 20:47
Copy link
Member

@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

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

Thanks!

@tagliala tagliala merged commit 97da462 into master Jan 4, 2025
22 checks passed
@tagliala tagliala deleted the chore/649-fix-warnings branch January 4, 2025 20:49
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.

warnings in tests
2 participants