Skip to content

Commit

Permalink
hooks for shellcheck, json and yaml check
Browse files Browse the repository at this point in the history
  • Loading branch information
lindot11 committed Dec 1, 2023
1 parent 0a057c2 commit 2b213fe
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,21 @@ repos:
- id: markdownlint
files: '^(client|servers/execution/runner|servers/lib)/.*\.md$'
stages: [pre-commit]

- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.18
hooks:
- id: shellcheck
files: '^(docs|deploy|script|ssl)/.*'
stages: [pre-commit]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-json
files: '^(docs|deploy|script|ssl)/.*'
stages: [pre-commit]
- id: check-yaml
files: '^(docs|deploy|script|ssl)/.*'
stages: [pre-commit]

2 changes: 1 addition & 1 deletion client/src/components/tab/TabComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function renderScopeTabList(scope: TabData[][], subIndex: number): JSX.Element {

function renderScopeTabPanels(
scope: TabData[][],
subIndex: number
subIndex: number,
): JSX.Element {
return (
<>
Expand Down
2 changes: 1 addition & 1 deletion client/src/route/library/Library.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function createCombinedTabs() {
/>
</>
),
}))
})),
);
}

Expand Down
6 changes: 3 additions & 3 deletions client/test/unitTests/Components/TabComponent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('TabComponent', () => {

test('renders an empty tab', () => {
const { getByText } = render(
<TabComponent assetType={assetTypeTabs} scope={scopeTabs} />
<TabComponent assetType={assetTypeTabs} scope={scopeTabs} />,
);
const emptyTab = getByText('Functions');
expect(emptyTab).toBeInTheDocument();
Expand Down Expand Up @@ -60,10 +60,10 @@ describe('TabComponent', () => {
}

expect(
screen.queryByText(assetTypeTabs[0].body.props.children)
screen.queryByText(assetTypeTabs[0].body.props.children),
).not.toBeInTheDocument();
expect(
screen.queryByText(assetTypeTabs[1].body.props.children)
screen.queryByText(assetTypeTabs[1].body.props.children),
).not.toBeInTheDocument();
});

Expand Down
2 changes: 1 addition & 1 deletion script/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COMMIT_HASH=$(git rev-parse --short HEAD)
export COMMIT_HASH
export MKDOCS_ENABLE_PDF_EXPORT=1

echo ${VERSION}
echo "${VERSION}"
if [ -d site ]
then
rm -rf site
Expand Down
6 changes: 5 additions & 1 deletion script/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ sudo -H pip3 install qrcode
sudo apt-get install -y rubygems
sudo gem install mdl

# Install shellcheck
sudo apt-get install -y shellcheck

# Install madge for generating dependency graphs of typescript projects
sudo apt-get install -y graphviz
sudo npm install -g madge
sudo npm install -g madge

0 comments on commit 2b213fe

Please sign in to comment.