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 diagnostics in the preprocessor #2515

Merged
merged 9 commits into from
Feb 19, 2024

Conversation

alessio-perugini
Copy link
Contributor

@alessio-perugini alessio-perugini commented Jan 29, 2024

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

We're adding the diagnostics in the preprocessing part.

What is the current behavior?

Currently, the diagnostics are considered only for the sketch compilation.

What is the new behavior?

The diagnostics field will report errors from the preprocessor and the compiler.

Does this PR introduce a breaking change, and is titled accordingly?

Other information

I'm proposing to use a struct that Stores the information of the diagnostics instead of using a callback approach. We can always revert that.

@alessio-perugini alessio-perugini linked an issue Jan 29, 2024 that may be closed by this pull request
3 tasks
@alessio-perugini alessio-perugini self-assigned this Jan 29, 2024
@alessio-perugini alessio-perugini added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jan 29, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (205a6a5) 68.92% compared to head (be0b8c4) 69.74%.
Report is 7 commits behind head on master.

Files Patch % Lines
...lder/internal/preprocessor/arduino_preprocessor.go 0.00% 12 Missing ⚠️
...rnal/arduino/builder/internal/detector/detector.go 46.66% 6 Missing and 2 partials ⚠️
...rnal/arduino/builder/internal/diagnostics/store.go 57.89% 6 Missing and 2 partials ⚠️
...nal/arduino/builder/internal/preprocessor/ctags.go 61.11% 7 Missing ⚠️
...ernal/arduino/builder/internal/preprocessor/gcc.go 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2515      +/-   ##
==========================================
+ Coverage   68.92%   69.74%   +0.82%     
==========================================
  Files         204      206       +2     
  Lines       20452    20845     +393     
==========================================
+ Hits        14096    14538     +442     
+ Misses       5207     5166      -41     
+ Partials     1149     1141       -8     
Flag Coverage Δ
unit 69.74% <61.22%> (+0.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@alessio-perugini alessio-perugini changed the title 2511 add diagnostics in the preprocessor [breaking] add diagnostics in the preprocessor Jan 30, 2024
@alessio-perugini alessio-perugini force-pushed the 2511-add-diagnostics-in-the-preprocessor branch 3 times, most recently from 0498c1a to ff36bba Compare January 31, 2024 12:12
The `diagnostics` field was duplicated, it should be retrived by calling only
.builer_result.diagnostics
@alessio-perugini alessio-perugini force-pushed the 2511-add-diagnostics-in-the-preprocessor branch 2 times, most recently from 0d6989e to 22905b6 Compare January 31, 2024 16:26
@alessio-perugini alessio-perugini force-pushed the 2511-add-diagnostics-in-the-preprocessor branch from 22905b6 to 06ee3bd Compare January 31, 2024 16:52
@alessio-perugini alessio-perugini changed the title [breaking] add diagnostics in the preprocessor Add diagnostics in the preprocessor Feb 1, 2024
@alessio-perugini alessio-perugini marked this pull request as ready for review February 1, 2024 08:41
@alessio-perugini alessio-perugini force-pushed the 2511-add-diagnostics-in-the-preprocessor branch from 9be2db0 to e756cf3 Compare February 6, 2024 09:38
@alessio-perugini alessio-perugini force-pushed the 2511-add-diagnostics-in-the-preprocessor branch from e756cf3 to be0b8c4 Compare February 6, 2024 09:54
@alessio-perugini alessio-perugini merged commit d99184e into master Feb 19, 2024
214 checks passed
@alessio-perugini alessio-perugini deleted the 2511-add-diagnostics-in-the-preprocessor branch February 19, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add diagnostics in the preprocessor
3 participants