Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
docker build -t localhost:5000/comify:0.1.0 -f docker/Dockerfile .
VERSION=$(jq -r '.version' package.json)

docker build -t "localhost:5000/comify:$VERSION" -f docker/Dockerfile .
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a shebang to specify the shell interpreter.

Same issue as docker/push.sh - the script lacks a shebang line (SC2148).

Proposed fix
+#!/bin/bash
+
 VERSION=$(jq -r '.version' package.json)
 
 docker build -t "localhost:5000/comify:$VERSION" -f docker/Dockerfile .

Consistent versioning pattern with push.sh.

The dynamic versioning approach mirrors docker/push.sh, ensuring build and push operations use the same version source.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
VERSION=$(jq -r '.version' package.json)
docker build -t "localhost:5000/comify:$VERSION" -f docker/Dockerfile .
#!/bin/bash
VERSION=$(jq -r '.version' package.json)
docker build -t "localhost:5000/comify:$VERSION" -f docker/Dockerfile .
🧰 Tools
🪛 Shellcheck (0.11.0)

[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

(SC2148)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker/build.sh` around lines 1 - 3, Add a shebang line to the top of the
script to specify the shell interpreter (use the same shebang as docker/push.sh,
e.g., /usr/bin/env bash) so the VERSION=$(jq -r '.version' package.json)
assignment and docker build -t "localhost:5000/comify:$VERSION" -f
docker/Dockerfile . invocation run under the intended shell; after adding the
shebang ensure the script file is executable in the repo so CI/automation can
run it consistently.

4 changes: 3 additions & 1 deletion docker/push.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
docker push localhost:5000/comify:0.1.0
VERSION=$(jq -r '.version' package.json)

docker push "localhost:5000/comify:$VERSION"
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a shebang to specify the shell interpreter.

The script lacks a shebang line. This is flagged by shellcheck (SC2148) and is important for portability and explicit shell specification.

Proposed fix
+#!/bin/bash
+
 VERSION=$(jq -r '.version' package.json)
 
 docker push "localhost:5000/comify:$VERSION"

Dynamic versioning approach is solid.

Reading the version from package.json eliminates manual tag management and ensures consistency between the application version and Docker image tags.

🧰 Tools
🪛 Shellcheck (0.11.0)

[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

(SC2148)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker/push.sh` around lines 1 - 3, Add a shebang as the first line of the
script to specify the shell interpreter (e.g., #!/usr/bin/env bash) so the
script runs with a consistent shell; ensure it appears before the existing
VERSION=$(jq -r '.version' package.json) assignment and the docker push command
to satisfy shellcheck SC2148 and improve portability while keeping the dynamic
VERSION usage intact.

6 changes: 1 addition & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import eslint from '@eslint/js';
import tsparser from '@typescript-eslint/parser';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import sonarjs from 'eslint-plugin-sonarjs';
import tseslint from 'typescript-eslint';

export default tseslint.config(
Expand All @@ -23,8 +22,7 @@ export default tseslint.config(
files: ["**/*.{ts,tsx}"],
plugins: {
'react': react,
'react-hooks': reactHooks,
'sonarjs': sonarjs,
'react-hooks': reactHooks
},
languageOptions: {
parser: tsparser,
Expand All @@ -37,7 +35,6 @@ export default tseslint.config(
}
},
rules: {
...sonarjs.configs.recommended.rules,
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
"@typescript-eslint/no-non-null-assertion": "off",
Expand All @@ -51,7 +48,6 @@ export default tseslint.config(
"brace-style": ["error", "allman", { "allowSingleLine": true }],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"sonarjs/assertions-in-tests": "off",
"no-console": "error",

"no-undef": "off", // typescript handles this for us
Expand Down
Loading
Loading