PBS Pro has a coding style guide but I noticed both existing code and new PRs that do not conform to the style standard. I think we should turn on the code style checker in Codacy (if it has one) or add one in our CI. This will relieve maintainers and developers from checking for style issues during code reviews. What do you think?
By coding style checker I mean a tool that checks for cosmetics issues like wrong spaces, variable naming, and brackets. Currently Codacy’s style checker does not report these.
Hello @minghui. All code changes should conform to the style guide you referenced, and all reviewers and maintainers should flag problems prior to accepting any change. Unfortunately, this does not always happen either due to time constraints or lack of familiarity with the guide. Integrating a style checker with GitHub would be a better way to automatically flag issues and enforce conformance. I have not researched this topic, but I have to believe there are multiple options to consider.
Thank you, @mkaro. I agree that a service integrated with GitHub is a better option. Actually I think Codacy, the static analysis tool we are using right now has that feature. It is just not turned on right now. We can turn it on and customize it to use our style standard.
@agrawalravi90 Would you mind checking if Codacy supports a coding style checker (for formatting)? Thank you.
Hey, sorry for the delay in responding to this, it somehow got buried. I reached out to Codacy to see if this can be done, and, unfortunately, it seems like it cannot at the moment:
From: John from Codacy firstname.lastname@example.org
Sent: Wednesday, October 4, 2017 3:29 PM
To: Ravi Agrawal
Subject: Re: Hi, does Codacy have the ability to catch non-conformity to C codin…
Thank you for contacting us. Codacy does not catch non-conformity for C. I have added this as a requested feature on our user feedback sheet for future consideration.
John John from Codacy
On Wed, Oct 4, 2017 at 01:46 PM, “Ravi Agrawal” email@example.com wrote:
Hi, does Codacy have the ability to catch non-conformity to C coding style formats like K&R, GNU etc?
Thank you, @agrawalravi90. I will look into other options for now before Codacy adds that feature.