Coder Social home page Coder Social logo

Comments (3)

dweiss avatar dweiss commented on June 11, 2024

The latter should result in warnings but not in hard errors.

I think it should result in hard errors, always. If you know the use is justified, you'll have to add SuppressForbidden to the piece of code that uses those APIs. This is an explicit step (and you can grep your code for those annotations). Realistically, nobody looks at the log scroll...

from forbidden-apis.

guillerodriguez avatar guillerodriguez commented on June 11, 2024

The latter should result in warnings but not in hard errors.

I think it should result in hard errors, always

That is a matter of policy. The ignoreFailures property exists, so obviously it is useful for some people.

If you know the use is justified, you'll have to add SuppressForbidden to the piece of code that uses those APIs. This is an explicit step (and you can grep your code for those annotations.

That is one option but not the only one. Note that I am not talking about “forbidden APIs that can be used in exceptional cases”, which is a perfect use case for annotations, but about APIs that are not recommended (but allowed), have known pitfalls, etc, where a warning is ok but failing the build would be too much.

Realistically, nobody looks at the log scroll...

Then ignoreFailures would not exist.

In any case what I am proposing here is a way to add flexibility to an existing option, in a backwards compatible way. If someone does not want to use it, they don’t need to.

from forbidden-apis.

dweiss avatar dweiss commented on June 11, 2024

The ignoreFailures property exists, so obviously it is useful for some people.

Maybe - I didn't add it, Uwe did. I just expressed my opinion. :)

from forbidden-apis.

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.