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

Refactor C linters for better extensibility/reuse #6346

Merged
merged 8 commits into from
Aug 19, 2024

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Aug 3, 2024

Most importantly, we can run readLines() + preprocess the file only once, then pass that output to each linter.

Copy link
Member Author

MichaelChirico commented Aug 3, 2024

@MichaelChirico MichaelChirico changed the title refactor Refactor C linters for better extensibility/reuse Aug 3, 2024
@MichaelChirico MichaelChirico added the graphite-ready PRs that are managed by Graphite, possibly marked as draft, but ready for review label Aug 3, 2024
@MichaelChirico MichaelChirico marked this pull request as ready for review August 5, 2024 06:48
Base automatically changed from clint-omp to master August 5, 2024 06:50
@MichaelChirico MichaelChirico removed the graphite-ready PRs that are managed by Graphite, possibly marked as draft, but ready for review label Aug 8, 2024
alloc_linter = function(c_file) {
lines <- readLines(c_file)
alloc_linter = function(c_obj) {
lines <- c_obj$lines
Copy link
Member

Choose a reason for hiding this comment

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

I know its not directly data.table but still feels strange that we do not use = for assignment in this file (style linting the linter files)

Copy link
Member

@ben-schwen ben-schwen left a comment

Choose a reason for hiding this comment

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

LGTM (besides <- and = mix)

Copy link
Member Author

MichaelChirico commented Aug 19, 2024

Merge activity

@MichaelChirico MichaelChirico merged commit 8af7b43 into master Aug 19, 2024
8 checks passed
@MichaelChirico MichaelChirico deleted the 08-02-refactor branch August 19, 2024 16:07
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