programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
nitefox@lemmy.world to C++English · 2 年前

Is there a linter for cpp similar to how ESlint works?

message-square
message-square
6
link
fedilink
3
message-square

Is there a linter for cpp similar to how ESlint works?

nitefox@lemmy.world to C++English · 2 年前
message-square
6
link
fedilink
alert-triangle
You must log in or register to comment.
  • jormaig
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 年前

    I would recommend clang-tidy. You can have it running if you use the clangd Language Server.

    • glad_cat@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 年前

      +1 for clang-tidy because clang is good. There is also scan-build in clang but it’s a PITA to use.

      And for OP, you can also install sonarlint on some editors/IDE but I don’t know if the scanned code is sent remotely or not.

      • zbb@mastodon.social
        link
        fedilink
        arrow-up
        3
        ·
        2 年前

        @glad_cat @jormaig

        Here’s also a good resource for linters and formatters, sorted by languages:

        https://github.com/caramelomartins/awesome-linters

    • nitefox@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 年前

      I will go with this, thank you!

    • AlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      2
      ·
      2 年前

      I wish people just used clang-tidy instead of pushing all the crap that’s out there, like for instance PC-Lint Plus. At work the head of IT makes our work a living hell by insisting the CI runs a shit beta version of PC-Lint Plus which lacks full C++17 support and we have to reinvent stuff like variants and deprive ourselves of many C++ features because of one single linting tool.

  • auv_guy
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 年前

    I use cppcheck.

C++

cpp

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

The center for all discussion and news regarding C++.

Rules

  • Respect instance rules.
  • Don’t be a jerk.
  • Please keep all posts related to C++.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 18 users / week
  • 44 users / month
  • 201 users / 6 months
  • 513 local subscribers
  • 2K subscribers
  • 289 Posts
  • 616 Comments
  • Modlog
  • mods:
  • lysdexic
  • farados@vlemmy.net
  • Nihili0
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org