Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git hooks libms #294

Conversation

lindot11
Copy link
Contributor

  • The pre-commit framework can replace the existing git hooks smoothly

    • Benefits: code quality improvement in terms of consistency, automation, maintainability
    • Hooks are installed in Gits default hook path ./git/hooks/ for the automated checks to work
    • If this replacement is approved, the .git-hooks directory and configure-git-hooks.sh script can be removed
    • The githook_test.sh, githook_test_log.txt and githook_run_log.txt shall be removed before merging to upstream
  • The hooks have successfully been tested

    • Logs can be seen here
  • A new git hooks script was created and the /docs/developer/index.md have been updated

  • A hook for testing the lib on pre-push have also been added to the .pre-commit-config.yaml

    • The hook is commented-out because when run the test fails and exits
  • Git hook corrections

    • We have accepted the format and syntax corrections from the git hooks that we assume are fine
    • This log shows the suggested corrections that we have not accepted and raises the following questions
      • What should the markdown line length be configured to?
      • What should we title the header for this README?
      • Can we remove this README?
  • Try the hooks manually

    • Setup
      • bash script/setup-git-hooks.sh
    • Run
      • pre-commit run --hook-stage pre-commit
      • pre-commit run --hook-stage pre-push

lindot11 and others added 30 commits October 3, 2023 13:36
@prasadtalasila
Copy link
Contributor

@lindot11, A few more suggestions:

  1. In docs/developer/index.md, after this sentence: "The git-hooks will ensure that your commits are formatted correctly and that the tests pass before you push the commits to remote repositories."
    add these two commands and their explanation
  pre-commit run --hook-stage pre-commit
  pre-commit run --hook-stage pre-push
  1. Please add shellcheck, json and yaml plugins as well.
  2. The files in docs/, deploy/, script/ and ssl/ directories need to be linted by eslint, shellcheck, json and yaml plugins. This step is to be part of pre-commit stage hook.
  3. Please rebase the PR and squash the commits. There are almost 250+ commits in this PR.

Thanks.

@lindot11 lindot11 force-pushed the git-hooks-libms branch 2 times, most recently from e7cf3aa to 006bff7 Compare November 29, 2023 18:55
| localhost:3000/phase | [ hello ] | The array get appended with each invocation. All the elements of are _array_. |
| localhost:3000/lifecycle/phase | _true_ | Always returns _true_ |
|||

Copy link

Choose a reason for hiding this comment

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

Multiple consecutive blank lines

prasadtalasila and others added 6 commits December 1, 2023 11:33
  - Adds package publication for runner
  - Updates READMEs of lib and runner microservices
  - Cleans up yarn commands of runner to make them cross-platform
  - Adds documentation for new example
removed typo

added repo to test pre-commit

test pre-commit with typo

undo typo and uncomment mdlint

test pre-commit with typo

remove type

test pre-commit

uncomment format-check

test dummy format

test dummy

commit dummies to git for test git diff

test pre-commit eslint

pre-commit config to replace custom pre-commit

added directory lib to hooks

test pre-commit yarn install

yarn install logic to pre-commit

prettified pre-commit-config

added pre-push hooks

test dummy pre-push

test pre-push yarn jest

test pre-push yarn jest

test again

test pre-push again

test again

TEST CORRECTLY

test manual push

another manual test

test all pre-commit hooks

added default hooks

added pre-push test for lib

test git hooks dir

test git hooks dir

test dir with dummie

undo hook dir back to before

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

reset after test

test git hooks

test git hooks

test git hooks

reset after test

test git hooks

reset after test

test git hooks

test git hooks

reset after test

test git hooks

reset after test

reset after test

reset after test

reset after test

reset after test

test script for git hooks done

githook test and log for documentation

reset after test

reset after test

reset after test

reset after test

reset after test

reset after test

reset after test

reset after test

test git hooks

reset after test

test git hooks

reset after test

test git hooks

reset after test

improved test

went back to original test

test git hooks

final test script

reset after test

test git hooks

reset after test

reset after test

reset after test

reset after test

reset after test

test and log done

added new githook script and updated guide

comment out lib test hook

stage markdownlint changes

log githook run

accept prettified changes

updated run log

removed logs and test from repo

updated configure-git-hooks script and docs

updated hook to use markdownlint/markdownlint

removed unnecessary readme

added prettier config to client

undo change

non trailling commas for client and lib

undo trailing commas to test code cov

Revert "undo trailing commas to test code cov"

This reverts commit e5bf319.

undo trailling commas to test codecov

undo trailling commas in lib

undo single quote prettier

test undo semiconlons

test remove trailling commas lib

set traillingcomma all

undo prettierrc

accept prettier lib improves codecov

accept prettier client improves codecov

Swap ml-workspace container and improve docs (INTO-CPS-Association#300)

  - Replaces ml-workspace container with
    ml-workspace-minimal container. This change
    potentially improves the speed of user
    workspace.
  - Adds guide book to help with non-standard
    installation scenarios.
  - Adds MongoDB installation to services.js

---------
Co-authored-by: nichlaes <[email protected]>

Corrects docker commands and updates docs (INTO-CPS-Association#304)

  - Corrects docker run commands to always restart the containers
  - Updates diagrams in docs to include MongoDB
  - Adds yarn clean command to package.json of services.

uncomment prettier

replace deprecated code_blocks

uncomment markdownlint

fixed table mdl error

ignore url line length mdl

redo  mdl hook

ignore table line length and use .markdownlint.yaml instead

replaced by pre-commit framework

adhere to code climate linelength

Adds scope to library tabs (INTO-CPS-Association#235 and INTO-CPS-Association#321)

  - Shows the right directory for each tab in Library page
  - Adds second level tabs to Library page. These tabs separate
     private and common assets

---------
Co-authored-by: caesarv16 <[email protected]>
Co-authored-by: s88004 <[email protected]>

markdownlint disable codeblock test

test deprecated code_blocks in codeclimate

shortened comment to adhere to line_length
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283986 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283967 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283901 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283878 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283866 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283821 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283802 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283787 +0100

parent 7709e00
author lindot11 <[email protected]> 1701026896 +0100
committer Linda Nguyen <[email protected]> 1701283759 +0100

skip package upgrade

added new githook script and updated guide

comment out lib test hook

log githook run

updated run log

removed logs and test from repo

updated configure-git-hooks script and docs

removed unnecessary readme

added prettier config to client

undo change

non trailling commas for client and lib

undo trailing commas to test code cov

Revert "undo trailing commas to test code cov"

This reverts commit e5bf319.

test undo semiconlons

set traillingcomma all

undo prettierrc

accept prettier lib improves codecov

Corrects docker commands and updates docs (INTO-CPS-Association#304)

  - Corrects docker run commands to always restart the containers
  - Updates diagrams in docs to include MongoDB
  - Adds yarn clean command to package.json of services.

uncomment prettier

replaced by pre-commit framework

adhere to code climate linelength

markdownlint disable codeblock test

test deprecated code_blocks in codeclimate

shortened comment to adhere to line_length

skip package upgrade

Update docs and adds publication for runner (INTO-CPS-Association#275)

  - Adds package publication for runner
  - Updates READMEs of lib and runner microservices
  - Cleans up yarn commands of runner to make them cross-platform
  - Adds documentation for new example

  Fixes mistakes in the docs

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

test git hooks

reset after test

test git hooks

test git hooks

test git hooks

reset after test

test git hooks

reset after test

test git hooks

test git hooks

reset after test

test git hooks

reset after test

reset after test

reset after test

reset after test

reset after test

test script for git hooks done

githook test and log for documentation

reset after test

reset after test

reset after test

reset after test

reset after test

reset after test

reset after test

reset after test

test git hooks

reset after test

test git hooks

reset after test

test git hooks

reset after test

improved test

went back to original test

test git hooks

final test script

reset after test

test git hooks

reset after test

reset after test

reset after test

reset after test

reset after test

test and log done

added new githook script and updated guide

comment out lib test hook

log githook run

updated run log

removed logs and test from repo

updated configure-git-hooks script and docs

updated hook to use markdownlint/markdownlint

undo change

non trailling commas for client and lib

undo trailing commas to test code cov

Revert "undo trailing commas to test code cov"

This reverts commit e5bf319.

undo trailling commas to test codecov

undo trailling commas in lib

undo single quote prettier

test undo semiconlons

test remove trailling commas lib

set traillingcomma all

undo prettierrc

accept prettier lib improves codecov

accept prettier client improves codecov

Swap ml-workspace container and improve docs (INTO-CPS-Association#300)

  - Replaces ml-workspace container with
    ml-workspace-minimal container. This change
    potentially improves the speed of user
    workspace.
  - Adds guide book to help with non-standard
    installation scenarios.
  - Adds MongoDB installation to services.js

---------
Co-authored-by: nichlaes <[email protected]>

Corrects docker commands and updates docs (INTO-CPS-Association#304)

  - Corrects docker run commands to always restart the containers
  - Updates diagrams in docs to include MongoDB
  - Adds yarn clean command to package.json of services.

uncomment prettier

replace deprecated code_blocks

uncomment markdownlint

fixed table mdl error

ignore url line length mdl

redo  mdl hook

ignore table line length and use .markdownlint.yaml instead

markdownlint disable codeblock test

fix wrong reset action

Revert "accept prettier client improves codecov"

This reverts commit 924a5cd.

Revert "skip package upgrade"

This reverts commit ae8bea4.
<!-- markdownlint-disable MD046 -->
!!! Requirements

- User needs to have an account on server2.
Copy link

Choose a reason for hiding this comment

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

Code block style

@@ -22,6 +22,12 @@ The git-hooks will ensure that your commits are formatted
correctly and that the tests pass before you
push the commits to remote repositories.

You can also run the git-hooks manually before staging changes using the following commands
Copy link

Choose a reason for hiding this comment

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

Line length

@@ -22,6 +22,12 @@ The git-hooks will ensure that your commits are formatted
correctly and that the tests pass before you
push the commits to remote repositories.

You can also run the git-hooks manually before staging changes using the following commands
```bash
Copy link

Choose a reason for hiding this comment

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

Fenced code blocks should be surrounded by blank lines

@lindot11
Copy link
Contributor Author

lindot11 commented Dec 1, 2023

After running pre-commit run -a, the markdownlint checks suggest many corrections for the files. Should i solve it in this in this PR?

markdownlint.............................................................Failed
- hook id: markdownlint
- exit code: 1

docs/admin/guides/add_user.md:10:1 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:10:15 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:14:1 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:14:28 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:34:1 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:34:32 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:43:1 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:43:31 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:79:1 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/guides/add_user.md:79:26 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/overview.md:27:50 MD034/no-bare-urls Bare URL used [Context: "https://foo.com"]
docs/admin/overview.md:28:14 MD034/no-bare-urls Bare URL used [Context: "http://foo.com"]
docs/admin/vagrant/base-box.md:106:62 MD047/single-trailing-newline Files should end with a single newline character
docs/user/digital-twins/lifecycle.md:31:81 MD013/line-length Line length [Expected: 80; Actual: 138]
docs/user/digital-twins/lifecycle.md:32:81 MD013/line-length Line length [Expected: 80; Actual: 122]
docs/user/digital-twins/lifecycle.md:33:81 MD013/line-length Line length [Expected: 80; Actual: 153]
docs/user/digital-twins/lifecycle.md:34:81 MD013/line-length Line length [Expected: 80; Actual: 122]
docs/user/examples/drobotti-rmqfmu/README.md:70:81 MD013/line-length Line length [Expected: 80; Actual: 96]
docs/user/examples/water_tank_swap/README.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 85]
docs/user/examples/water_tank_swap/README.md:38:81 MD013/line-length Line length [Expected: 80; Actual: 105]
docs/user/features.md:35:81 MD013/line-length Line length [Expected: 80; Actual: 163]
docs/user/features.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 86]
docs/user/features.md:37:81 MD013/line-length Line length [Expected: 80; Actual: 126]
docs/user/features.md:38:81 MD013/line-length Line length [Expected: 80; Actual: 92]
docs/user/features.md:49:81 MD013/line-length Line length [Expected: 80; Actual: 218]
docs/user/features.md:50:81 MD013/line-length Line length [Expected: 80; Actual: 88]
docs/user/features.md:52:81 MD013/line-length Line length [Expected: 80; Actual: 109]
docs/user/website/index.md:127:5 MD037/no-space-in-emphasis Spaces inside emphasis markers [Context: "* d"]
docs/user/website/index.md:129:5 MD037/no-space-in-emphasis Spaces inside emphasis markers [Context: "* m"]
deploy/README.md:108:47 MD034/no-bare-urls Bare URL used [Context: "https://gitlab.foo.com/"]
deploy/README.md:110:43 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/Library"]
deploy/README.md:111:81 MD013/line-length Line length [Expected: 80; Actual: 87]
deploy/README.md:161:68 MD034/no-bare-urls Bare URL used [Context: "https://foo.com"]
deploy/vagrant/two-machine/README.md:44:48 MD034/no-bare-urls Bare URL used [Context: "WWW"]
docs/admin/guides/add_service.md:21:81 MD013/line-length Line length [Expected: 80; Actual: 99]
docs/admin/guides/add_service.md:22:81 MD013/line-length Line length [Expected: 80; Actual: 99]
docs/admin/guides/add_service.md:23:81 MD013/line-length Line length [Expected: 80; Actual: 99]
docs/admin/guides/add_service.md:24:81 MD013/line-length Line length [Expected: 80; Actual: 99]
docs/admin/guides/add_service.md:25:81 MD013/line-length Line length [Expected: 80; Actual: 99]
docs/admin/guides/add_service.md:26:81 MD013/line-length Line length [Expected: 80; Actual: 99]
docs/FAQ.md:57:81 MD013/line-length Line length [Expected: 80; Actual: 104]
docs/FAQ.md:68:81 MD013/line-length Line length [Expected: 80; Actual: 240]
docs/FAQ.md:72:81 MD013/line-length Line length [Expected: 80; Actual: 113]
docs/FAQ.md:93:81 MD013/line-length Line length [Expected: 80; Actual: 172]
docs/FAQ.md:104:81 MD013/line-length Line length [Expected: 80; Actual: 164]
docs/FAQ.md:123:81 MD013/line-length Line length [Expected: 80; Actual: 120]
docs/FAQ.md:135:81 MD013/line-length Line length [Expected: 80; Actual: 191]
docs/FAQ.md:149:81 MD013/line-length Line length [Expected: 80; Actual: 155]
docs/FAQ.md:155:81 MD013/line-length Line length [Expected: 80; Actual: 131]
docs/FAQ.md:171:81 MD013/line-length Line length [Expected: 80; Actual: 102]
docs/FAQ.md:178:81 MD013/line-length Line length [Expected: 80; Actual: 100]
docs/FAQ.md:262:81 MD013/line-length Line length [Expected: 80; Actual: 151]
LICENSE.md:23:49 MD034/no-bare-urls Bare URL used [Context: "http://www.into-cps.org"]
LICENSE.md:26:10 MD034/no-bare-urls Bare URL used [Context: "http://www.gnu.org/copyleft/gp..."]
LICENSE.md:294:8 MD034/no-bare-urls Bare URL used [Context: "http://www.eclipse.org/legal/e..."]
LICENSE.md:298:8 MD034/no-bare-urls Bare URL used [Context: "http://www.gnu.org/copyleft/gp..."]
docs/admin/client/auth.md:45:81 MD013/line-length Line length [Expected: 80; Actual: 90]
docs/admin/client/auth.md:92:81 MD013/line-length Line length [Expected: 80; Actual: 92]
docs/admin/client/auth.md:94:81 MD013/line-length Line length [Expected: 80; Actual: 123]
docs/admin/client/auth.md:94:3 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/au"]
docs/admin/client/auth.md:94:78 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/au"]
docs/admin/client/auth.md:94:49 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/au/Library"]
docs/admin/client/auth.md:94:24 MD034/no-bare-urls Bare URL used [Context: "https://foo.gitlab.com"]
docs/admin/client/auth.md:95:81 MD013/line-length Line length [Expected: 80; Actual: 125]
docs/admin/client/auth.md:95:3 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/acme"]
docs/admin/client/auth.md:95:80 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/au"]
docs/admin/client/auth.md:95:51 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/au/Library"]
docs/admin/client/auth.md:95:26 MD034/no-bare-urls Bare URL used [Context: "https://foo.gitlab.com"]
docs/admin/client/auth.md:96:81 MD013/line-length Line length [Expected: 80; Actual: 124]
docs/admin/client/auth.md:96:79 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/au"]
docs/admin/client/auth.md:96:50 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/au/Library"]
docs/admin/client/auth.md:96:3 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/bar"]
docs/admin/client/auth.md:96:25 MD034/no-bare-urls Bare URL used [Context: "https://foo.gitlab.com"]
docs/admin/client/auth.md:112:3 MD047/single-trailing-newline Files should end with a single newline character
docs/admin/host.md:119:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/host.md:120:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/host.md:121:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/host.md:121:59 MD034/no-bare-urls Bare URL used [Context: "https://gitlab.foo.com/"]
docs/admin/host.md:123:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/host.md:123:59 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/Library"]
docs/admin/host.md:124:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/host.md:179:68 MD034/no-bare-urls Bare URL used [Context: "https://foo.com"]
docs/admin/servers/lib/LIB-MS.md:106:52 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/servers/lib/LIB-MS.md:106:59 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/servers/lib/LIB-MS.md:108:20 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/servers/lib/LIB-MS.md:108:27 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/servers/lib/LIB-MS.md:115:8 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/servers/lib/LIB-MS.md:115:15 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
docs/admin/trial.md:32:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/trial.md:33:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/trial.md:34:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/trial.md:34:59 MD034/no-bare-urls Bare URL used [Context: "https://gitlab.foo.com/"]
docs/admin/trial.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/admin/trial.md:36:59 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/Library"]
docs/admin/trial.md:37:81 MD013/line-length Line length [Expected: 80; Actual: 108]
docs/LICENSE.md:23:49 MD034/no-bare-urls Bare URL used [Context: "http://www.into-cps.org"]
docs/LICENSE.md:25:42 MD034/no-bare-urls Bare URL used [Context: "http://www.gnu.org/copyleft/gp..."]
docs/LICENSE.md:294:8 MD034/no-bare-urls Bare URL used [Context: "http://www.eclipse.org/legal/e..."]
docs/LICENSE.md:299:8 MD034/no-bare-urls Bare URL used [Context: "http://www.gnu.org/copyleft/gp..."]
docs/user/servers/lib/LIB-MS.md:41:26 MD034/no-bare-urls Bare URL used [Context: "https://foo.com/lib"]
docs/user/servers/lib/LIB-MS.md:45 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
docs/user/servers/lib/LIB-MS.md:75 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
docs/user/servers/lib/LIB-MS.md:134 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
docs/user/servers/lib/LIB-MS.md:148 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
docs/user/servers/lib/LIB-MS.md:168 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
docs/user/servers/lib/LIB-MS.md:186 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
docs/user/servers/lib/LIB-MS.md:208 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
docs/user/servers/lib/LIB-MS.md:220 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]
deploy/services/README.md:16:40 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
deploy/services/README.md:16:54 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
deploy/services/README.md:17:32 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
deploy/services/README.md:17:51 MD050/strong-style Strong style should be consistent [Expected: asterisk; Actual: underscore]
servers/lib/test/data/user2/tools/README.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "content123"]

@prasadtalasila
Copy link
Contributor

@lindot11
The git commit does not work if pre-commit hook fails. If these linting issues exist, then the commits will not go forward right?
Is there a way to let pre-commit exit with success status (exit 0 status) even if the markdown linter throws up errors?
This is equivalent to making a pre-commit plugin produce warnings for violations instead of errors.

@lindot11
Copy link
Contributor Author

lindot11 commented Dec 1, 2023

I could not find args or configs settings that could fix this issue, so I made a script.

The script wraps the markdownlint hook and outputs the linting issues, but exits with code 0.
Then configured the markdownlint hook verbose setting to true, so that it will always show the detected linting issues when exited 0.

Copy link

codeclimate bot commented Dec 1, 2023

Code Climate has analyzed commit 73550a5 and detected 0 issues on this pull request.

View more on Code Climate.

prasadtalasila added a commit that referenced this pull request Dec 3, 2023
  - Replaces existing git hooks with pre-commit framework
    based git hooks.
  - Adds formatting changes introduced by prettier and eslint.

---------
Co-authored-by: Linda Nguyen <[email protected]>
Co-authored-by: Mads Kelberg <[email protected]>
Co-authored-by: lindot09 <[email protected]>
Co-authored-by: lindot11 <[email protected]>
@prasadtalasila
Copy link
Contributor

Merged via PR #344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants