Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768131
D3175.id8094.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
11 KB
Referenced Files
None
Subscribers
None
D3175.id8094.diff
View Options
diff --git a/CodeSniffer/ruleset.xml b/CodeSniffer/ruleset.xml
--- a/CodeSniffer/ruleset.xml
+++ b/CodeSniffer/ruleset.xml
@@ -58,7 +58,7 @@
<severity>3</severity>
</rule>
<rule ref="Generic.Files.LineLength.MaxExceeded">
- <message>This line contains %2$s characters. Try below 80.</message>
+ <message>This line contains %2$s characters. Try below 80.</message>
</rule>
<!-- Write simple code. -->
diff --git a/JetBrains/php-codestyle.xml b/JetBrains/php-codestyle.xml
--- a/JetBrains/php-codestyle.xml
+++ b/JetBrains/php-codestyle.xml
@@ -1,81 +1,81 @@
<code_scheme name="Nasqueron">
- <option name="OTHER_INDENT_OPTIONS">
- <value>
- <option name="INDENT_SIZE" value="4" />
- <option name="CONTINUATION_INDENT_SIZE" value="8" />
- <option name="TAB_SIZE" value="4" />
- <option name="USE_TAB_CHARACTER" value="true" />
- <option name="SMART_TABS" value="false" />
- <option name="LABEL_INDENT_SIZE" value="0" />
- <option name="LABEL_INDENT_ABSOLUTE" value="false" />
- <option name="USE_RELATIVE_INDENTS" value="false" />
- </value>
- </option>
- <PHPCodeStyleSettings>
- <option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
- <option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
- <option name="ALIGN_PHPDOC_COMMENTS" value="true" />
- <option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
- <option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
- <option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
- <option name="PHPDOC_WRAP_LONG_LINES" value="true" />
- <option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
- <option name="LOWER_CASE_NULL_CONST" value="true" />
- <option name="ELSE_IF_STYLE" value="COMBINE" />
- <option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" />
- <option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
- <option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
- <option name="SPACE_BEFORE_COLON_IN_RETURN_TYPE" value="true" />
- <option name="PHPDOC_USE_FQCN" value="true" />
- </PHPCodeStyleSettings>
- <XML>
- <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
- </XML>
- <codeStyleSettings language="JSON">
- <indentOptions>
- <option name="INDENT_SIZE" value="4" />
- </indentOptions>
- </codeStyleSettings>
- <codeStyleSettings language="PHP">
- <option name="RIGHT_MARGIN" value="80" />
- <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
- <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
- <option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
- <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
- <option name="CLASS_BRACE_STYLE" value="1" />
- <option name="METHOD_BRACE_STYLE" value="1" />
- <option name="CATCH_ON_NEW_LINE" value="true" />
- <option name="SPECIAL_ELSE_IF_TREATMENT" value="true" />
- <option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
- <option name="ALIGN_MULTILINE_FOR" value="false" />
- <option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
- <option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
- <option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
- <option name="SPACE_BEFORE_SEMICOLON" value="true" />
- <option name="SPACE_AFTER_TYPE_CAST" value="false" />
- <option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
- <option name="CALL_PARAMETERS_WRAP" value="1" />
- <option name="METHOD_PARAMETERS_WRAP" value="5" />
- <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
- <option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
- <option name="EXTENDS_LIST_WRAP" value="1" />
- <option name="EXTENDS_KEYWORD_WRAP" value="1" />
- <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
- <option name="PARENTHESES_EXPRESSION_RPAREN_WRAP" value="true" />
- <option name="BINARY_OPERATION_WRAP" value="1" />
- <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
- <option name="TERNARY_OPERATION_WRAP" value="1" />
- <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
- <option name="FOR_STATEMENT_WRAP" value="1" />
- <option name="FOR_STATEMENT_LPAREN_ON_NEXT_LINE" value="true" />
- <option name="FOR_STATEMENT_RPAREN_ON_NEXT_LINE" value="true" />
- <option name="ARRAY_INITIALIZER_WRAP" value="5" />
- <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
- <option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
- <option name="ASSIGNMENT_WRAP" value="1" />
- <option name="IF_BRACE_FORCE" value="3" />
- <option name="DOWHILE_BRACE_FORCE" value="3" />
- <option name="WHILE_BRACE_FORCE" value="3" />
- <option name="FOR_BRACE_FORCE" value="3" />
- </codeStyleSettings>
+ <option name="OTHER_INDENT_OPTIONS">
+ <value>
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="true" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </value>
+ </option>
+ <PHPCodeStyleSettings>
+ <option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
+ <option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
+ <option name="ALIGN_PHPDOC_COMMENTS" value="true" />
+ <option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
+ <option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
+ <option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
+ <option name="PHPDOC_WRAP_LONG_LINES" value="true" />
+ <option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
+ <option name="LOWER_CASE_NULL_CONST" value="true" />
+ <option name="ELSE_IF_STYLE" value="COMBINE" />
+ <option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" />
+ <option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
+ <option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
+ <option name="SPACE_BEFORE_COLON_IN_RETURN_TYPE" value="true" />
+ <option name="PHPDOC_USE_FQCN" value="true" />
+ </PHPCodeStyleSettings>
+ <XML>
+ <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
+ </XML>
+ <codeStyleSettings language="JSON">
+ <indentOptions>
+ <option name="INDENT_SIZE" value="4" />
+ </indentOptions>
+ </codeStyleSettings>
+ <codeStyleSettings language="PHP">
+ <option name="RIGHT_MARGIN" value="80" />
+ <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
+ <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
+ <option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
+ <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
+ <option name="CLASS_BRACE_STYLE" value="1" />
+ <option name="METHOD_BRACE_STYLE" value="1" />
+ <option name="CATCH_ON_NEW_LINE" value="true" />
+ <option name="SPECIAL_ELSE_IF_TREATMENT" value="true" />
+ <option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
+ <option name="ALIGN_MULTILINE_FOR" value="false" />
+ <option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
+ <option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
+ <option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
+ <option name="SPACE_BEFORE_SEMICOLON" value="true" />
+ <option name="SPACE_AFTER_TYPE_CAST" value="false" />
+ <option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
+ <option name="CALL_PARAMETERS_WRAP" value="1" />
+ <option name="METHOD_PARAMETERS_WRAP" value="5" />
+ <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
+ <option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
+ <option name="EXTENDS_LIST_WRAP" value="1" />
+ <option name="EXTENDS_KEYWORD_WRAP" value="1" />
+ <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
+ <option name="PARENTHESES_EXPRESSION_RPAREN_WRAP" value="true" />
+ <option name="BINARY_OPERATION_WRAP" value="1" />
+ <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
+ <option name="TERNARY_OPERATION_WRAP" value="1" />
+ <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_WRAP" value="1" />
+ <option name="FOR_STATEMENT_LPAREN_ON_NEXT_LINE" value="true" />
+ <option name="FOR_STATEMENT_RPAREN_ON_NEXT_LINE" value="true" />
+ <option name="ARRAY_INITIALIZER_WRAP" value="5" />
+ <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
+ <option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
+ <option name="ASSIGNMENT_WRAP" value="1" />
+ <option name="IF_BRACE_FORCE" value="3" />
+ <option name="DOWHILE_BRACE_FORCE" value="3" />
+ <option name="WHILE_BRACE_FORCE" value="3" />
+ <option name="FOR_BRACE_FORCE" value="3" />
+ </codeStyleSettings>
</code_scheme>
diff --git a/pre-commit-hooks/shellcheck.sh b/pre-commit-hooks/shellcheck.sh
old mode 100755
new mode 100644
--- a/pre-commit-hooks/shellcheck.sh
+++ b/pre-commit-hooks/shellcheck.sh
@@ -19,43 +19,43 @@
severity="style"
parse_arguments() {
- while (($# > 0)); do
- # Grab param and value splitting on " " or "=" with parameter expansion
- local PARAMETER="${1%[ =]*}"
- local VALUE="${1#*[ =]}"
- if [[ "$PARAMETER" == "$VALUE" ]]; then VALUE="$2"; fi
- shift
- case "$PARAMETER" in
- --enable)
- enable_list="$enable_list $VALUE"
- ;;
- --severity)
- severity=$VALUE
- ;;
- -*)
- echo "Error: Unknown option: $PARAMETER" >&2
- exit 1
- ;;
- *)
- files="$files $PARAMETER"
- ;;
- esac
- done
- enable_list="${enable_list## }" # remove preceeding space
+ while (($# > 0)); do
+ # Grab param and value splitting on " " or "=" with parameter expansion
+ local PARAMETER="${1%[ =]*}"
+ local VALUE="${1#*[ =]}"
+ if [[ "$PARAMETER" == "$VALUE" ]]; then VALUE="$2"; fi
+ shift
+ case "$PARAMETER" in
+ --enable)
+ enable_list="$enable_list $VALUE"
+ ;;
+ --severity)
+ severity=$VALUE
+ ;;
+ -*)
+ echo "Error: Unknown option: $PARAMETER" >&2
+ exit 1
+ ;;
+ *)
+ files="$files $PARAMETER"
+ ;;
+ esac
+ done
+ enable_list="${enable_list## }" # remove preceeding space
}
parse_arguments "$@"
for FILE in $files; do
- SHEBANG_REGEX='^#!\(/\|/.*/\|/.* \)\(\(ba\|da\|k\|a\)*sh\|bats\)$'
- if (head -1 "$FILE" | grep "$SHEBANG_REGEX" >/dev/null); then
- if ! shellcheck ${enable_list:+ --enable="$enable_list"} --severity="$severity" "$FILE"; then
- exit_status=1
- fi
- elif [[ "$FILE" =~ .+\.(sh|bash|dash|ksh|ash|bats)$ ]]; then
- echo "$FILE: missing shebang"
- exit_status=1
- fi
+ SHEBANG_REGEX='^#!\(/\|/.*/\|/.* \)\(\(ba\|da\|k\|a\)*sh\|bats\)$'
+ if (head -1 "$FILE" | grep "$SHEBANG_REGEX" >/dev/null); then
+ if ! shellcheck ${enable_list:+ --enable="$enable_list"} --severity="$severity" "$FILE"; then
+ exit_status=1
+ fi
+ elif [[ "$FILE" =~ .+\.(sh|bash|dash|ksh|ash|bats)$ ]]; then
+ echo "$FILE: missing shebang"
+ exit_status=1
+ fi
done
exit $exit_status
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 06:44 (19 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258996
Default Alt Text
D3175.id8094.diff (11 KB)
Attached To
Mode
D3175: Adhere to code conventions
Attached
Detach File
Event Timeline
Log In to Comment