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

Set default log mode to Warn+ and streamline error handling and cleanup #243

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

soumeh01
Copy link
Collaborator

@soumeh01 soumeh01 commented Jun 18, 2024

This update includes the following changes:

  1. To reduce log noise, the default log mode is set to Warn+, which means only warning and error messages will be logged by default.
  2. Error messages have been revised to be more intuitive for users.
  3. Redundant error messages have been removed.
  4. Removed error cbuild: exit status 1
  5. .csolution.yml is now the expected extension and .csolution.yaml is no longer accepted

Note: Please be informed that to get the detailed logs use --verbose option

Copy link
Contributor

github-actions bot commented Jun 18, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link
Contributor

github-actions bot commented Jun 18, 2024

Test Results

  4 files  ±0   48 suites  +4   5s ⏱️ -2s
201 tests  - 1  201 ✅  - 1  0 💤 ±0  0 ❌ ±0 
804 runs   - 4  804 ✅  - 4  0 💤 ±0  0 ❌ ±0 

Results for commit 90907b7. ± Comparison against base commit 4cced48.

This pull request removes 9 and adds 8 tests. Note that renamed tests count towards both.
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/builder/cbuildidx ‑ TestCheckCbuildIdx
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/builder/cbuildidx ‑ TestCheckCbuildIdx/test_existent_file,_invalid_extension
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/builder/cbuildidx ‑ TestCheckCbuildIdx/test_invalid_file
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/builder/cbuildidx ‑ TestCheckCbuildIdx/test_valid_cbuild-idx
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/builder/csolution ‑ TestGetIdxFilePath/test_get_idx_file_path_with_output_path
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestGetProjectName
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestGetProjectName/test_get_project_name_from_backslash_path
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestGetProjectName/test_get_project_name_from_path
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestGetProjectName/test_get_project_name_with_invalid_file_name
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/errutils ‑ TestNew
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/errutils ‑ TestNew/Basic_usage
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/errutils ‑ TestNew/Multiple_arguments
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/errutils ‑ TestNew/No_arguments
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestFileExists
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestFileExists/Existing_File
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestFileExists/Invalid_Path
github.com/Open-CMSIS-Pack/cbuild/v2/pkg/utils ‑ TestFileExists/Non-Existing_File

♻️ This comment has been updated with latest results.

@soumeh01 soumeh01 changed the title No Info msgs in default mode & error consolidation Set default log mode to Warn+ and streamline error handling and cleanup Jun 18, 2024
@soumeh01 soumeh01 requested review from brondani and jkrech June 18, 2024 14:00
pkg/errutils/errutils.go Outdated Show resolved Hide resolved
pkg/errutils/errutils.go Outdated Show resolved Hide resolved
pkg/errutils/errutils.go Outdated Show resolved Hide resolved
pkg/errutils/errutils.go Outdated Show resolved Hide resolved
pkg/errutils/errutils.go Outdated Show resolved Hide resolved
Copy link

codeclimate bot commented Jun 19, 2024

Code Climate has analyzed commit 90907b7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 60.5% (50% is the threshold).

This pull request will bring the total coverage in the repository to 78.6% (-1.1% change).

View more on Code Climate.

Copy link
Member

@jkrech jkrech left a comment

Choose a reason for hiding this comment

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

My review comments were addressed.

@soumeh01 soumeh01 requested a review from brondani June 19, 2024 12:56
@soumeh01 soumeh01 merged commit 1aba21b into main Jun 19, 2024
15 of 16 checks passed
@soumeh01 soumeh01 deleted the outMsgs branch June 19, 2024 13:36
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.

3 participants