SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
nitefox@lemmy.world to C++@programming.devEnglish · 2 years ago

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

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

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

nitefox@lemmy.world to C++@programming.devEnglish · 2 years ago
message-square
6
fedilink
alert-triangle
You must log in or register to comment.
  • jormaig@programming.dev
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 years ago

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

    • glad_cat
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      +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 years ago

        @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 years ago

      I will go with this, thank you!

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

      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@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    I use cppcheck.

C++@programming.dev

cpp@programming.dev

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: !cpp@programming.dev

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.

  • 4 users / day
  • 23 users / week
  • 42 users / month
  • 200 users / 6 months
  • 32 local subscribers
  • 2.01K subscribers
  • 291 Posts
  • 608 Comments
  • Modlog
  • mods:
  • farados@vlemmy.net
  • Nihili0@programming.dev
  • lysdexic@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org