E010 fails on one-liner loops

Bug #1895102 reported by Pierre Riteau
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bash8
New
Undecided
Unassigned

Bug Description

bashate reports the error E010 for one-liner loops like:

$ echo 'for i in `seq 1 10`; do echo $i; done' > one-liner.sh
$ bashate one-liner.sh
one-liner.sh:1:1: E010 The "do" should be on same line as for
1 bashate error(s) found

This is because E010 fails if do is not at the end of the line, i.e. if it cannot match r';\s*do$'

We can argue about whether that's a bug or a feature, but the error message doesn't match because "do" *is* on the same line as for.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.