GithubHelp home page GithubHelp logo

#FIXME fails silently about credo HOT 6 CLOSED

GuiHeurich avatar GuiHeurich commented on July 16, 2024
#FIXME fails silently

from credo.

Comments (6)

rrrene avatar rrrene commented on July 16, 2024

I think I am missing something: You write

the #FIXME error shows up in yellow on the summary board

and

the above result looks like a PASS

but also say that Credo "fails silently".

How is it failing silently if the partial screenshot shows "found 47 software design suggestions" and exits with exit status 2?

from credo.

GuiHeurich avatar GuiHeurich commented on July 16, 2024

Hiya, thanks for replying.

Let me try to explain. "The above result looks like a PASS" means that it is not, in fact, a pass, because FIXME are treated as errors. The issue is the discrepancy between the failure and the display: the display only says "47 software design suggestions" but it actually fails because FIXME is treated as an error.

Steps to reproduce:

  1. Write a FIXME comment somewhere.
  2. Run mix credo and it will show no failure but will fail on CI.
  3. Run mix credo list and you can see the FIXME failure.

In short: FIXME are considered failures, but only the list panel shows them. The summarised version doesn't show the error.

from credo.

rrrene avatar rrrene commented on July 16, 2024

Ah, there is probably a fundamental misunderstanding here: There is no such thing as an "error" in Credo's results.

From the docs:

Credo fails with an exit status between 1 and 127 if it shows any issues.

An exit status of 2 is the correct result for the described scenario.

Nevertheless: The fact that mix credo list uses different colors is something we should definitely revisit. That is confusing 😞 👍

from credo.

GuiHeurich avatar GuiHeurich commented on July 16, 2024

OK. A "fundamental misunderstanding" is a rude way of putting this. There is no need to be rude. You are perfectly aware that I meant a failure when I said an error.

Also: the problem is not on mix credo list but on mix credo summary report.

from credo.

rrrene avatar rrrene commented on July 16, 2024

@GuiHeurich I am not a native speaker, so apologies if that is per se a rude way of phrasing it. How would you have preferred for this do be expressed?

There are no two types of output with Credo. Any raised "issue" that is in the output is an "issue", which leads to an exit status.

I get the impression that you think I am accusing you of something and that is not my intention. 🙏

from credo.

GuiHeurich avatar GuiHeurich commented on July 16, 2024

It's fine, don't worry about it - I'm not a native speaker either. Good luck with all your work.

from credo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.