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

Show more context for ShellCheck defects and fixes in console output 💾 #300

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

jamacku
Copy link
Member

@jamacku jamacku commented Aug 21, 2023

  • Documentation
  • CHANGELOG
  • tests - update fixtures
  • test feature

Partially fixes:

@jamacku jamacku self-assigned this Aug 21, 2023
@jamacku jamacku added this to the v5.0.0 milestone Aug 21, 2023
@jamacku jamacku marked this pull request as draft August 21, 2023 10:55
@jamacku jamacku added the type: feature New feature label Aug 21, 2023
@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #300 (3f94e1e) into main (f4325e6) will not change coverage.
The diff coverage is 80.00%.

❗ Current head 3f94e1e differs from pull request most recent head 070cb3b. Consider uploading reports for the commit 070cb3b to get more accurate results

@@           Coverage Diff           @@
##             main     #300   +/-   ##
=======================================
  Coverage   84.83%   84.83%           
=======================================
  Files           4        4           
  Lines         277      277           
=======================================
  Hits          235      235           
  Misses         42       42           
Files Changed Coverage Δ
src/functions.sh 84.39% <50.00%> (ø)
src/validation.sh 100.00% <100.00%> (ø)

When using --format=json1, the csgrep output is missing defect position.

Reported in: csutils/csdiff#138

Once fixed, this commit should be reverted
@jamacku jamacku force-pushed the csgrep-context branch 2 times, most recently from 00a47fb to 6bd1f03 Compare August 22, 2023 14:56
@@ -1,6 +1,9 @@
# shellcheck shell=bash
# SPDX-License-Identifier: GPL-3.0-or-later

# shellcheck source=summary.sh
. "${SCRIPT_DIR=}summary.sh"

Check warning

Code scanning / shellcheck

Not following: summary.sh: openBinaryFile: does not exist (No such file or directory) Warning

Not following: summary.sh: openBinaryFile: does not exist (No such file or directory)
@jamacku jamacku force-pushed the csgrep-context branch 9 times, most recently from dc24761 to 0899d12 Compare August 23, 2023 12:09
Show more context for ShellCheck defects and fixes in console output.
Using the `csgrep --embed-context` option allows us to show a part of
the code in which a defect is reported. This is much more user-friendly
than the current plain GCC output format.

This commit also fixes issues with statistics calculations.

Related to: redhat-plumbers-in-action#88
@jamacku jamacku marked this pull request as ready for review August 23, 2023 12:20
@jamacku jamacku merged commit 4a900ab into redhat-plumbers-in-action:main Aug 23, 2023
6 of 7 checks passed
@jamacku jamacku deleted the csgrep-context branch August 23, 2023 12:20
@jamacku jamacku linked an issue Aug 23, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shown alerts should include a possible solution (if available)
1 participant