Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add check for set e and operator#2237

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jchorl wants to merge1 commit intokoalaman:master
base:master
Choose a base branch
Loading
fromjchorl:jchorl/eand
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletionssrc/ShellCheck/Analytics.hs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,6 +190,7 @@ nodeChecks = [
,checkDollarQuoteParen
,checkUselessBang
,checkTranslatedStringVariable
,checkPipelineE
,checkModifiedArithmeticInRedirection
,checkBlatantRecursion
,checkBadTestAndOr
Expand DownExpand Up@@ -3808,6 +3809,12 @@ checkUselessBang params t = when (hasSetE params) $ mapM_ check (getNonReturning
x:rest -> x : dropLast rest
_ -> []

prop_checkPipelineE1 = verify checkPipelineE "set -e; echo hi && echo hello"
prop_checkPipelineE2 = verifyNot checkPipelineE "echo hi && echo hello"
checkPipelineE params x@(T_AndIf id _ _) = when (hasSetE params) $
info id 3061 "&& operators running with -e set will not exit on error"
checkPipelineE _ _ = return ()

prop_checkModifiedArithmeticInRedirection1 = verify checkModifiedArithmeticInRedirection "ls > $((i++))"
prop_checkModifiedArithmeticInRedirection2 = verify checkModifiedArithmeticInRedirection "cat < \"foo$((i++)).txt\""
prop_checkModifiedArithmeticInRedirection3 = verifyNot checkModifiedArithmeticInRedirection "while true; do true; done > $((i++))"
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp