Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

COM.PRES.Indent #119

Closed
10 tasks done
WaldoFR opened this issue Jun 14, 2018 · 1 comment · Fixed by #156
Closed
10 tasks done

COM.PRES.Indent #119

WaldoFR opened this issue Jun 14, 2018 · 1 comment · Fixed by #156

Comments

@WaldoFR
Copy link

WaldoFR commented Jun 14, 2018

Implementation of the rule COM.PRES.Indent.

Description

Code indentation must be spaces (no tabulation).

Known problems

Awk command handling

Description : The checker raises violation when using awk

  • Fix status

Quotes and double quotes handling

Description : Behaviour of the checker becomes inaccurate when reading quotes or double quotes.

  • Fix status

Cases statements handling

Description : Case statements is not handled correctly, which leads it to raise false positives.

  • Fix status

Comments handling

Description : The checker raises false positives after commented lines. This problem might be due by ELSE, CONT, currentPos and desiredPos in the lex.

  • Fix status

Analysis failure on braces

Description : It seems that the number of {} braces accounting cause crashes of the anaylsis. Might come from the item +([0-9]) of the case. For instance the code beetween braces in :
[[ $? != 0 ]] && { echo >&2 the required \"message\" command is not in your PATH; exit 1; }

  • Fix status

Forbidden increasing of identation not handled

Description : Bad increasing of indentation is not handled by the checker. For example :

 ma_fonction_affine ()
{
   if [ $# -ne 3 ]
   then
      my_function=$code_error_nbargs
   else
      printf "Calling : p1=%s p2=%s p3=%s\n" $1 $2 $3
              # operation : y = ax + b
        let y=$1*$2+$3
           printf "y=%s\n" $y
                       my_function=$y
   fi
}
  • Fix status

Function declaration

Description : The checker is not handling some types of functions declaration. The problem is the same one as defined for several rules in #49 .

  • Fix status

State of the implementation

  • Violation raising
  • Localization
  • Unit tests
@brigittehuynh
Copy link
Collaborator

Localization added via #49

brigittehuynh added a commit that referenced this issue Jul 22, 2018
remains
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
brigittehuynh added a commit that referenced this issue Aug 20, 2018
 - Awk command handling
 - Quotes and double quotes handling
 - Cases statements handling
 - Analysis failure on braces (issue due to [[)

The following issues no longer occur although there was no specific
correction for them. The overall modifications of the rule must have
resolved them:
 - Comments handling
 - Forbidden increasing of identation not handled
@WaldoFR WaldoFR mentioned this issue Sep 13, 2018
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
…tion (issue cnescatlab#137

remains
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
 - Awk command handling
 - Quotes and double quotes handling
 - Cases statements handling
 - Analysis failure on braces (issue due to [[)

The following issues no longer occur although there was no specific
correction for them. The overall modifications of the rule must have
resolved them:
 - Comments handling
 - Forbidden increasing of identation not handled
begarco pushed a commit that referenced this issue Feb 2, 2020
remains
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
begarco pushed a commit that referenced this issue Feb 2, 2020
 - Awk command handling
 - Quotes and double quotes handling
 - Cases statements handling
 - Analysis failure on braces (issue due to [[)

The following issues no longer occur although there was no specific
correction for them. The overall modifications of the rule must have
resolved them:
 - Comments handling
 - Forbidden increasing of identation not handled
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants