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

Add .shellcheckrc adapted for ReaR #2976

Merged
merged 1 commit into from Apr 28, 2023

Conversation

antonvoznia
Copy link
Contributor

@antonvoznia antonvoznia commented Apr 28, 2023

  • enable/disable SC2168 (local is only valid in functions) because scripts under lib/ are always sourced from functions, so "local" is valid inside them.
  • set shell=bash because ReaR uses bash but the scripts don't have shebangs.

Relax-and-Recover (ReaR) Pull Request Template

Please fill in the following items before submitting a new pull request:

Pull Request Details:
  • Type: Bug Fix

  • Impact: Low

  • Reference to related issue (URL):

  • How was this pull request tested?

  • Brief description of the changes in this pull request:

As a part of my master's thesis, I made a "research" about the Differential shellcheck usage.

I solved 2 problems in this PR:

These issues I described in my master's thesis, chapter 6.2
https://dspace.cvut.cz/bitstream/handle/10467/107238/F3-DP-2023-Voznia-Anton-dip_thesis-2.pdf?sequence=-1&isAllowed=y#toc%3A22

2 test examples with the fix:

- enable/disable SC2168 (local is only valid in functions) because
  scripts under lib/ are always sourced from functions, so "local" is
  valid inside them.
- set shell=bash because ReaR uses bash but the scripts don't have
  shebangs.
@pcahyna
Copy link
Member

pcahyna commented Apr 28, 2023

@antonvoznia thanks - I have one comment - you show two example PRs, both are generated with severity: style. But that's not the shellcheck severity we are using - we are using severity: error : 966379e#diff-eace62a8ebcdafd0f6975200d68cbf851300952aae47db07e71f383038a368b3R29 . Can you please update the example PR links to PRs generated with the same severity level?

Copy link
Contributor

@jamacku jamacku left a comment

Choose a reason for hiding this comment

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

I think .shellcheckrc in usr/share/rear/lib/ is redundant since one level above is .shellcheckrc with the same content.

EDIT: Sorry, I didn't notice enable/disable

@antonvoznia
Copy link
Contributor Author

@antonvoznia thanks - I have one comment - you show two example PRs, both are generated with severity: style. But that's not the shellcheck severity we are using - we are using severity: error : 966379e#diff-eace62a8ebcdafd0f6975200d68cbf851300952aae47db07e71f383038a368b3R29 . Can you please update the example PR links to PRs generated with the same severity level?

Hi @pcahyna , I'm sorry for the mistake.
I've updated it.

Thanks,
Anton

@pcahyna
Copy link
Member

pcahyna commented Apr 28, 2023

thank you, merging!

@pcahyna pcahyna merged commit 54df969 into rear:master Apr 28, 2023
14 checks passed
@jsmeix jsmeix added enhancement Adaptions and new features fixed / solved / done ReaR Project The ReaR project itself and the tooling we use to work on it. labels May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done ReaR Project The ReaR project itself and the tooling we use to work on it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants