Commit Graph

1913 Commits

Author SHA1 Message Date
hololeap fc9b63fb5e
Remove PortageAutoInternalVariables and python
The Gentoo eclass list is now populated using pure Haskell. The old
python generators and generated module are no longer needed.

Signed-off-by: hololeap <hololeap@users.noreply.github.com>
2023-08-05 15:31:15 -06:00
hololeap 272ef819b9
Scan for Gentoo eclass variables
Creates a Map of eclass names to eclass variables by scanning the
system for repositories and their respective eclasses. Runs `portageq`
to determine repository names and locations. Emits a warning if an
IOException is caught when attempting to run `portageq`.

This Map is passed via CheckSpec to AnalysisSpec and finally to
Parameters, where it is read by `checkUnusedAssignments` in order to
determine which variables can be safely ignored by this check.

Signed-off-by: hololeap <hololeap@users.noreply.github.com>
2023-08-05 15:31:15 -06:00
hololeap 08ae7ef836
New IO interface to scan for Gentoo eclass vars
Uses the `portageq` command to scan for repositories, which in turn are
scanned for eclasses, which are then scanned for eclass variables.

The variables are scanned using a heuristic which looks for

    "# @ECLASS_VARIABLE: "

at the start of each line, which means only properly documented
variables will be found.

Signed-off-by: hololeap <hololeap@users.noreply.github.com>
2023-08-04 17:19:05 -06:00
Matt Jolly e3d8483e49
Rebase of chromiumos fork
https://chromium.googlesource.com/chromiumos/third_party/shellcheck/
2023-08-04 15:56:48 -06:00
Vidar Holen dd747b2a98 SC2325/SC2326: Warn about ! ! foo and foo | ! bar (fixes #2810) 2023-07-30 19:18:27 -07:00
Vidar Holen 9490b94886 Save and restore pending here docs when sourcing files (fixes #2803) 2023-07-30 16:52:40 -07:00
Vidar Holen 372c0b667e SC2324: Warn when x+=1 appends. 2023-07-30 15:00:43 -07:00
Vidar Holen c9e27c2470
Merge pull request #2768 from nicolas-ot/add-dependabot
Add dependabot
2023-06-04 15:40:27 -07:00
Vidar Holen 4ffa9cc397
Merge pull request #2765 from josephcsible/bracedstring
Get rid of a dangerous partial function from checkSpacefulnessCfg'
2023-06-04 15:22:23 -07:00
Nicolas Theodarus b625cc1acc add dependabot.yml 2023-05-28 12:33:16 +02:00
Joseph C. Sible f03c437e2f Get rid of a dangerous partial function from checkSpacefulnessCfg' 2023-05-24 16:38:53 -04:00
Vidar Holen 824c802b63
Merge pull request #2749 from josephcsible/2734
Fix #2734: adjust bounds to compile on 9.6
2023-05-22 17:52:34 -07:00
Joseph C. Sible b3932dfa10 Fix #2734: adjust bounds to compile on 9.6
The whole test suite passes for me, including prop_checkOverwrittenExitCode8,
and I get the same set of findings with this build and shellcheck.net on
tools/testing/selftests/net/icmp_redirect.sh.
2023-05-01 00:02:53 -04:00
Vidar Holen a54965dd2c Merge branch 'ArenM-posix-read' 2023-04-30 14:49:36 -07:00
Vidar Holen 46b678fca8 Minor fixes to POSIX read without variable check 2023-04-30 14:49:10 -07:00
Vidar Holen be0d5d4163
Merge pull request #2746 from J-M0/fish-bad-shell
Add fish to the badShells list
2023-04-30 13:31:34 -07:00
James Morris 5fec3f9b34 Add fish to the badShells list 2023-04-24 22:08:22 -04:00
Vidar Holen 1164aa4efc Installing custom docker should no longer be necessary for buildx 2023-04-23 19:35:54 -07:00
Vidar Holen ff85a5a2a2 Merge branch 'felipecrs-vscode-binaries' 2023-04-23 16:48:28 -07:00
Vidar Holen 08b437974e Rewrite vscode-shellcheck blurb 2023-04-23 16:47:49 -07:00
Vidar Holen 15fd2c314c
Merge pull request #2682 from sxlijin/patch-1
Document Trunk Check integration
2023-04-23 10:23:03 -07:00
Felipe Santos e6e8ab0415
Mention VS Code ShellCheck binaries distribution 2023-02-05 11:13:07 -03:00
Vidar Holen b1ca3929e3 Upgrade cross-compilers to 9.2.5 to handle hashable-1.4.2.0 2023-02-04 19:55:25 -08:00
Vidar Holen c05380d518 Count CFEExit as control flow for the purposes of finding dominators 2023-02-04 14:47:40 -08:00
Vidar Holen 2842ce97b8 Remove fgl-5.8.1.0 as a dependency
ShellCheck is temporarily broken by
c8f56c1824
2023-02-04 11:38:20 -08:00
Vidar Holen 78dea1d4f9 Update changelog from release 2023-02-04 10:27:59 -08:00
Samuel Lijin 5a3eb89e38
Document Trunk Check integration
Trunk Check is a universal linter which integrates with a wide variety of linters and formatters, `shellcheck` included.

We're big fans of `shellcheck` and figured that you might find our tool to be interesting enough to include it in the integrations list.
2023-02-03 09:17:47 -08:00
Vidar Holen a526ee0829 Stable version 0.9.0
This release is dedicated to Mindustry: the most fun you can
have with open source (outside of shell scripting of course).
2022-12-12 21:49:19 -08:00
Vidar Holen 8c5fdc3522 Update copyright years 2022-12-12 21:49:19 -08:00
Vidar Holen ae199edb68 Let distrotest fail fast when there remaining executables 2022-12-11 20:51:39 -08:00
Vidar Holen 7cfcf6db8a Fix stack build 2022-12-11 19:31:58 -08:00
Vidar Holen a7c5be93dc Tighten bounds on packages 2022-12-11 19:22:21 -08:00
Vidar Holen 8754c21244 Avoid $ trigger TH 2022-12-11 19:22:06 -08:00
Vidar Holen 985ca2530d Add Docker testing for older and newer Ubuntu versions 2022-12-11 19:22:06 -08:00
Vidar Holen 3cae6cd6ab Allow building on deepseq < 1.4.2.0 2022-12-11 15:06:24 -08:00
Vidar Holen 74b1745a19 Fix compiler error on some GHC versions
Fixes the following error:

    src/ShellCheck/CFGAnalysis.hs:1394:40: error:
	* Couldn't match expected type `[S.Set a]'
		      with actual type `M.Map String FunctionValue'
	* In the second argument of `($)', namely
	    `mapStorage $ sFunctionTargets state'
	  In the expression: S.unions $ mapStorage $ sFunctionTargets state
	  In an equation for `declaredFuncs':
	      declaredFuncs = S.unions $ mapStorage $ sFunctionTargets state
	* Relevant bindings include
	    declaredFuncs :: S.Set a
	      (bound at src/ShellCheck/CFGAnalysis.hs:1394:13)
2022-12-11 15:06:24 -08:00
Vidar Holen 495e34d101 Add missing Semigroup import for older GHC 2022-12-11 14:19:24 -08:00
Vidar Holen 2a16a4e8c1 Add missing imports for later GHC versions 2022-12-10 15:17:08 -08:00
ArenM 3342902d9a Warn about 'read' without a variable in POSIX sh
Dash throws an error if the read command isn't supplied a variable name.
2022-11-17 18:46:15 -05:00
Vidar Holen 0786b2bf3c
Merge pull request #2601 from mavit/colon-after-exec
Permit colon after exec
2022-11-02 21:18:56 -07:00
Vidar Holen 84d8530f14 Add SVG logo 2022-10-29 12:50:37 -07:00
Vidar Holen 86e2b76730 Improve SC1059 error message 2022-10-29 12:50:26 -07:00
Vidar Holen b770984dfc Try to parse the inside of traps (fixes #2584) 2022-10-13 21:04:38 -07:00
Vidar Holen d9c9e60fb0 Allow arbitrary bats @test names (fixes #2587) 2022-10-13 20:21:59 -07:00
Vidar Holen 14056a7f3a Don't suggest pgrep for `ps -p .. | grep` (fixes #2597) 2022-10-12 20:22:02 -07:00
Vidar Holen a524929b69 Remove outdated test 2022-10-12 20:22:02 -07:00
Vidar Holen fa7943ac0e Revert "Add employer mandated disclaimer"
This reverts commit 5202072a34.
2022-10-11 20:10:34 -07:00
Vidar Holen 81c2ecaccb Remove true/false from SC2216/SC2217 (fixes #2603) 2022-10-11 19:40:29 -07:00
Vidar Holen fcba462a99
Merge pull request #2602 from DoxasticFox/issue-2550
Fix false positive for SC2312 when using `time`
2022-10-09 11:55:39 -07:00
Christian Nassif-Haynes 43aca62ca7 Fix false positive for SC2312 when using `time` 2022-10-10 03:33:38 +11:00