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(linter): no-global-assign look into globals config #8963

Conversation

Sysix
Copy link
Collaborator

@Sysix Sysix commented Feb 7, 2025

no-global-assign should report when readonly global variables are written.
Also the rule did only look into env and not into global too.

Created a new ctx pub function. Will maybe refactor other places. I think they have some problems too :)

Copy link
Collaborator Author

Sysix commented Feb 7, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-bug Category - Bug labels Feb 7, 2025
Copy link

codspeed-hq bot commented Feb 7, 2025

CodSpeed Performance Report

Merging #8963 will not alter performance

Comparing 02-07-fix_linter_no-global-assign_look_for_globals_entry_too (b191390) with main (5b548a1)

Summary

✅ 33 untouched benchmarks

@Sysix Sysix force-pushed the 02-07-fix_linter_no-global-assign_look_for_globals_entry_too branch 4 times, most recently from ae663d2 to 7b10cad Compare February 8, 2025 13:59
@Sysix Sysix removed the A-cli Area - CLI label Feb 8, 2025
@Sysix Sysix marked this pull request as ready for review February 8, 2025 14:08
@Sysix Sysix changed the title fix(linter): no-global-assign look for globals entry too fix(linter): no-global-assign look into globals config Feb 8, 2025
@Sysix Sysix force-pushed the 02-07-fix_linter_no-global-assign_look_for_globals_entry_too branch from a33460a to 7b10cad Compare February 8, 2025 14:43
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Feb 8, 2025
Copy link
Member

Boshen commented Feb 8, 2025

Merge activity

  • Feb 8, 10:00 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 8, 10:00 AM EST: A user added this pull request to the Graphite merge queue.
  • Feb 8, 10:18 AM EST: A user merged this pull request with the Graphite merge queue.

@Sysix Sysix force-pushed the 02-07-fix_linter_no-global-assign_look_for_globals_entry_too branch from 7b10cad to 5d5278d Compare February 8, 2025 15:00
graphite-app bot pushed a commit that referenced this pull request Feb 8, 2025
`no-global-assign` should report when `readonly` global variables are written.
Also the rule did only look into `env` and not into `global` too.

Created a new `ctx` pub function. Will maybe refactor other places. I think they have some problems too :)
@graphite-app graphite-app bot force-pushed the 02-07-fix_linter_no-global-assign_look_for_globals_entry_too branch from 5d5278d to 03de103 Compare February 8, 2025 15:07
@Sysix
Copy link
Collaborator Author

Sysix commented Feb 8, 2025

There was no failing test for it. I added one after the merge-label

`no-global-assign` should report when `readonly` global variables are written.
Also the rule did only look into `env` and not into `global` too.

Created a new `ctx` pub function. Will maybe refactor other places. I think they have some problems too :)
@graphite-app graphite-app bot force-pushed the 02-07-fix_linter_no-global-assign_look_for_globals_entry_too branch from 03de103 to b191390 Compare February 8, 2025 15:11
@graphite-app graphite-app bot merged commit b191390 into main Feb 8, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-07-fix_linter_no-global-assign_look_for_globals_entry_too branch February 8, 2025 15:18
Dunqing pushed a commit that referenced this pull request Feb 10, 2025
`no-global-assign` should report when `readonly` global variables are written.
Also the rule did only look into `env` and not into `global` too.

Created a new `ctx` pub function. Will maybe refactor other places. I think they have some problems too :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants