Skip to content
This repository was archived by the owner on Jun 18, 2021. It is now read-only.
This repository was archived by the owner on Jun 18, 2021. It is now read-only.

How to lint c++ code  #54

@gdams

Description

@gdams

Okay so I have thrown multiple C++ linting solutions around but can't seem to please everyone so I am going to go ahead and summarize them here:

Solution 1 - Include cpplint.py

Pros:

  • Can be used offline
  • Can edit the rules to suit the module

Cons:

  • Massive file (6000 lines)
  • Needs to be updated manually to remain consistent with node core

Solution 2 - Use an npm module which contains the cpplint.py file

Pros:

  • No massive file unless required
  • Can be used offline
  • Could potentially be adopted by node core
  • Can be shared with out nodejs modules

Cons:

  • Someone still needs to manage it (if node core doesn't want to adopt it then we have two files that can become out of sync)

Solution 3 - Use a Makefile which curls cpplint.py from node core

Pros:

  • No massive file unless required
  • No need to maintain the file as node core already does this

Cons:

  • Using a Makefile has compatibility issues with windows/aix
  • Can't be used offline

Would love to hear what you guys think is the best solution so that we can start using it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions