Coder Social home page Coder Social logo

Comments (12)

hackling avatar hackling commented on August 29, 2024
┃    __ CODE IN QUESTION
┃
┃       fn(field)->
┃                ^^
┃
┃    __ WHY IT MATTERS
┃
┃       Don't use spaces after operators like `+`, `-`, `*` and `/`. This is the
┃       **preferred** way, although other styles are possible, as long as it is
┃       applied consistently.

Worth noting the false positive I got here....

from credo.

rrrene avatar rrrene commented on August 29, 2024

Hi Nicholas,

your first example is clearly a bug in Credo. In the second example, the help text is wrong 😞 my bad!

Will investigate and fix soon!

from credo.

rrrene avatar rrrene commented on August 29, 2024

And thx for reporting! 👍

from credo.

rrrene avatar rrrene commented on August 29, 2024

v0.3.6 contains a patch for this! Thx for reporting 👍

from credo.

c-rack avatar c-rack commented on August 29, 2024

@rrrene I have a similar false positive for this line (a simple input to integer function):
https://github.com/c-rack/cidr-elixir/blob/master/lib/cidr.ex#L196

Just checked with 0.3.6, but the "There are spaces around operators most of the time, but not here" message still appears for this line. Shall I open another issue or want you re-open this one?

from credo.

rrrene avatar rrrene commented on August 29, 2024

@Crack Please check with cough v0.3.7. 😁

from credo.

c-rack avatar c-rack commented on August 29, 2024

Works like a charm, thanks 👍

from credo.

dylan-chong avatar dylan-chong commented on August 29, 2024

Is the first issue mentioned supposed to be fixed?

I can still get that issue using IO.inspect -3 and assert -3 == -3

┃ [C] ↗ There are spaces around operators most of the time, but not here.

from credo.

jessejanderson avatar jessejanderson commented on August 29, 2024

I'm getting this error for a test where I want to assert a negative result. I'm using 0.9.0-rc1.

assert -12 == MyApp.fun_that_should_return_a_negative

from credo.

dylan-chong avatar dylan-chong commented on August 29, 2024

@rrrene I just want to check that you are getting these messages.

from credo.

rrrene avatar rrrene commented on August 29, 2024

@dylan-chong 👍

from credo.

rrrene avatar rrrene commented on August 29, 2024

This has been fixed for Elixir version >= 1.6.0-rc. 👍

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.