Skip to content

Commit

Permalink
maint/code-cleanup: Check for gindent 2.2.11
Browse files Browse the repository at this point in the history
Signed-off-by: Hui Zhou <hzhou321@anl.gov>
  • Loading branch information
wesbland authored and hzhou committed Jan 10, 2019
1 parent be6f541 commit 4a69039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions maint/code-cleanup.sh
Expand Up @@ -7,10 +7,10 @@ else
fi

indent_version=$($indent --version)
if echo "$indent_version" | grep -q "GNU indent"; then
if echo "$indent_version" | grep -q "GNU indent 2.2.11"; then
:
else
echo "This script requires GNU indent."
echo "This script requires GNU indent version 2.2.11."
exit
fi

Expand Down

3 comments on commit 4a69039

@wkliao
Copy link
Contributor

@wkliao wkliao commented on 4a69039 Mar 21, 2019

Choose a reason for hiding this comment

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

This can be a problem when using a GNU indent version newer than 2.2.11. (I am using 2.2.12.)

@hzhou
Copy link
Contributor

@hzhou hzhou commented on 4a69039 Mar 21, 2019

Choose a reason for hiding this comment

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

There is inconsistency between version 2.2.11 and 2.2.12. There will be problem unless we force a single consistent version everywhere -- right now, it seems forcing ver. 2.2.11 is a lesser evil.

You need install gnu indent 2.2.11 if you choose to use code-cleanup.sh for MPICH (at this point).

@wesbland
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. As @hzhou said, if you use 2.2.12, you'll get a completely different output so we have to lock down the version. Unfortunately, it's not always easy to get 2.2.11, especially on a Mac. If you want a Homebrew recipe to get that working, you can use the one I posted (with instructions) here:

https://gist.github.com/wesbland/501063f151c1eb815d8001abf2285cbe

Let me know if that has gone stale. I haven't had to apply it in a while so I don't know if the recipe has changed.

Please sign in to comment.