Dietpi: META | Implement automated code check?

Created on 23 Jun 2018  ยท  4Comments  ยท  Source: MichaIng/DietPi

As the "Checks" tab on PRs always pop into my eyes, I had a look into this code checker marketplace. For open source projects, everything I had a look at is for free.
E.g. Codacy supports shell and does code quality checks: https://github.com/marketplace/codacy

  • Hmm seems to be the only tool that supports SHELL at all, if all the supported languages lists are complete ๐Ÿค”.

Of course as we are legend, we don't need it ๐Ÿ˜€, but could be still interesting what they find?

โ‚ฌ: Travis CI has integrated ShellCheck (?): https://github.com/koalaman/shellcheck#travis-ci

META Question

Most helpful comment

Played a bid around:

  • ~https://bettercodehub.com requires admin access, no cannot be used as contributor.~

    • As I am repo owner now I could have a closer look. It just does very rough assumptions about script/block/loop sizes and such that mostly do not fit our coding style and needs.

  • https://www.codefactor.io allows to be used as contributor. But it identifies only files with .sh/.bash ending as shell scripts, so does not scan DietPi core scripts. I already opened an GitHub issue about that.
    EDIT: No joy so far: https://github.com/codefactor-io/codefactor/issues/2
    EDIT2: Request has been added to their roadmap (see above), would be exceptional ๐Ÿ˜ƒ!
  • https://app.codacy.com allows to customize file endings, but their support verified, that it is not possible to add empty/non file endings as well. He said he will forward the idea to allow that, we will see.

Finally, so far only PREP and bashrc.d/ scripts are scanned which makes the CI solutions more-less useless for DietPi currently ๐Ÿ˜‰.

All 4 comments

@MichaIng

I tried codacy for a while, but didn't like it if i'am honest. No errors found, but its mostly "minor recommends" which do not suit our project coding style. eg:

if (( $var )); then
= $ not required. Yes I know, but I prefer it to match [[ $var ]] style code.

Couldn't find a way to change the detection options either, so removed it.

Played a bid around:

  • ~https://bettercodehub.com requires admin access, no cannot be used as contributor.~

    • As I am repo owner now I could have a closer look. It just does very rough assumptions about script/block/loop sizes and such that mostly do not fit our coding style and needs.

  • https://www.codefactor.io allows to be used as contributor. But it identifies only files with .sh/.bash ending as shell scripts, so does not scan DietPi core scripts. I already opened an GitHub issue about that.
    EDIT: No joy so far: https://github.com/codefactor-io/codefactor/issues/2
    EDIT2: Request has been added to their roadmap (see above), would be exceptional ๐Ÿ˜ƒ!
  • https://app.codacy.com allows to customize file endings, but their support verified, that it is not possible to add empty/non file endings as well. He said he will forward the idea to allow that, we will see.

Finally, so far only PREP and bashrc.d/ scripts are scanned which makes the CI solutions more-less useless for DietPi currently ๐Ÿ˜‰.

I mark this as closed for now. Will recheck probably sometime in the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

k-plan picture k-plan  ยท  3Comments

1021683053 picture 1021683053  ยท  3Comments

Fourdee picture Fourdee  ยท  3Comments

Fourdee picture Fourdee  ยท  3Comments

aesirteam picture aesirteam  ยท  3Comments