-
Notifications
You must be signed in to change notification settings - Fork 10
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
Programmatically check/enforce "agreed upon" style and conventions #6
Comments
Not wanting to blow my own horn, but FORD might be useful for this. What On 12/01/16 12:23, Izaak Beekman wrote:
Chris MacMackin |
@cmacmackin FORD is an incredibly useful and powerful tool. Using it as a library, or extracting logic from it could be a great way to bootstrap a linter/style audit tool. |
I'd have to think about it a bit more, but I think I'd prefer to fork On 12/01/16 12:32, Izaak Beekman wrote:
Chris MacMackin |
You are into my mind, confess! I am almost sure to have suggested such a thing into google group CLF without obtaining any interests 😢 @cmacmackin However, I think @zbeekman is too futuristic: we have just started to discuss 😄 P.S. in only two posts I have learned a lot of slang:
|
@zbeekman I agree, I was just trying to teasing you 😄 |
I also vote for a Fortran linter (something sorely needed). If it's based on FORD, then all the better! |
AKA make a "linter" or style audit tool.
It would be great to be able to have a tool to check conformance of program source code to a set of style guides, as well as check for dubious constructs. Ideally such a tool would have the ability to include or exclude individual rules, and print warnings showing the offending constructs, their line number, and which file they are found in, along with an exit status to indicate success (no offenses) or failure. Additionally it would be wonderful to be able to add custom rules in a simple syntax, to allow projects that don't agree with the set of common guidelines we come up with to add their own.
Obviously, this is a very long term goal, and to a degree I may be putting the cart before the horse here: First we need to come to a consensus, or at least a compromise, of what the rules of style are, before we start thinking of ways to detect whether or not they are being violated.
Additionally we're going to need to consider how to implement such a tool: Do we need a full parser for the entire Fortran language, or could we do something more quick and dirty based on regular expressions etc.
Also, if we decide to create such a tool what language etc. should we use? We could use Fortran itself, however, even with some nice recent improvements like deferred length characters and reallocation on assignment, other languages, like Python, might be quicker and easier to implement such a tool.
The text was updated successfully, but these errors were encountered: