# Add coding style checker

**URL:** <https://community.openpbs.org/t/add-coding-style-checker/690>\
**Category:** Developers\
**Created:** [September 27, 2017, 5:49pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690 "2017-09-27T17:49:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![minghui](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/minghui/32/69_2.png) [@minghui](https://community.openpbs.org/u/minghui)\
**Post date:** [September 27, 2017, 5:49pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690/1 "2017-09-27T17:49:53Z")

</div>

Hi everyone,

PBS Pro has a [coding style guide](https://pbspro.atlassian.net/wiki/spaces/DG/pages/5537826/Coding+Standards) 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?

Thanks,

---

<div class="post-metadata">

**Author:** ![minghui](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/minghui/32/69_2.png) [@minghui](https://community.openpbs.org/u/minghui)\
**Post date:** [September 27, 2017, 5:58pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690/2 "2017-09-27T17:58:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [September 27, 2017, 6:06pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690/3 "2017-09-27T18:06:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![minghui](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/minghui/32/69_2.png) [@minghui](https://community.openpbs.org/u/minghui)\
**Post date:** [September 27, 2017, 6:57pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690/4 "2017-09-27T18:57:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![minghui](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/minghui/32/69_2.png) [@minghui](https://community.openpbs.org/u/minghui)\
**Post date:** [September 28, 2017, 9:50pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690/5 "2017-09-28T21:50:05Z")

</div>

@agrawalravi90 Would you mind checking if Codacy supports a coding style checker (for formatting)? Thank you.

---

<div class="post-metadata">

**Author:** ![agrawalravi90](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@agrawalravi90](https://community.openpbs.org/u/agrawalravi90)\
**Post date:** [October 4, 2017, 3:19pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690/6 "2017-10-04T15:19:36Z")

</div>

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 [john.botelho@codacy.intercom-mail.com](mailto:john.botelho@codacy.intercom-mail.com)  
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…

Hello

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.

Cheers

–  
John John from Codacy

On Wed, Oct 4, 2017 at 01:46 PM, “Ravi Agrawal” [ragrawal@altair.com](mailto:ragrawal@altair.com) wrote:

```
Hi, does Codacy have the ability to catch non-conformity to C coding style formats like K&R, GNU etc?
```

---

<div class="post-metadata">

**Author:** ![minghui](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/minghui/32/69_2.png) [@minghui](https://community.openpbs.org/u/minghui)\
**Post date:** [October 6, 2017, 9:00pm UTC](https://community.openpbs.org/t/add-coding-style-checker/690/7 "2017-10-06T21:00:49Z")

</div>

Thank you, @agrawalravi90. I will look into other options for now before Codacy adds that feature.
