Skip to content

Inconsistent indentation in compile_all.py scripts may have unintended consequences #33

@timmattison

Description

@timmattison

While converting the Python 2 scripts to Python 3 today I noticed that all of the compile_all.py scripts are very similar. However, a few of them have slightly different formatting. In each compile_all.py the code checks to see if the action value is equal to measure. In the following files this code is indented an extra level:

Fortran/compile_all.py
Java/compile_all.py
Lua/compile_all.py
JRuby/compile_all.py
FSharp/compile_all.py
Perl/compile_all.py
Java-GraalVM/compile_all.py
compile_all.py
Chapel/compile_all.py
Ada/compile_all.py
Racket/compile_all.py
Go/compile_all.py
OCaml/compile_all.py

The effect of this is that in the files in this list check to see if the Makefile file exists and then later check to see if the action is measure. The files that are not in this list check if the action is measure whether or not the Makefile exists.

When action is equal to measure the compile_all.py script sleeps for 5 seconds. I have not looked into how this affects the outcome but the scripts should probably be consistent even if there's no effect on the end results. I'm assuming that the check should only happen when Makefile exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions