Code Monkey home page Code Monkey logo

Comments (9)

bbatsov avatar bbatsov commented on May 23, 2024 2

It's also a bit weird that RuboCop::Error ended up in rubocop-ast. Probably we should just use a different constant in rubocop and rubocop-ast, but that's definitely not a big deal.

from rubocop-ast.

bbatsov avatar bbatsov commented on May 23, 2024

I was about to file the same ticket myself. :D Eventually we should move everything that's under RuboCop currently to RuboCop::AST. We have to be smart about this, however, as it's going to cause breakages - one option would be to utilize some aliasing.

from rubocop-ast.

marcandre avatar marcandre commented on May 23, 2024

Looks like a good idea to move NodePattern, ProcessedSource and Token into AST.

Probably best to create the aliases in rubocop gem itself... I'll take care of that.

We could do the same for RuboCop::Error, but I feel it's less sensical. Would be strange that ConfigNotFoundError would be a AST::Error...

I think it's a principle to have a common base class for errors. I don't think we need a rubocop-core/tools/base gem just for that and a few odds and ends, but I'm not against it either.

An alternative solution would be to have RuboCop::AST::Error and have RuboCop::Error be a module that we include (instead of derive from) in rubocop; it would be included in AST::Error from rubocop gem. This way rescue RuboCop::Error would still rescue both AST::Error and ConfigNotFoundError.

from rubocop-ast.

marcandre avatar marcandre commented on May 23, 2024

Forgot to mention, but ValidationError doesn't belong in rubocop-ast, my bad. I'll fix that too.

from rubocop-ast.

marcandre avatar marcandre commented on May 23, 2024

Nevermind, Error & al. can be moved no problem, my bad.

from rubocop-ast.

bbatsov avatar bbatsov commented on May 23, 2024

👍

Okay, I guess once this is done we can bump rubocop-ast to 1.0.

from rubocop-ast.

marcandre avatar marcandre commented on May 23, 2024

I'll release 0.0.3 for now... and we can release 1.0 at the same time as rubocop?

from rubocop-ast.

bbatsov avatar bbatsov commented on May 23, 2024

Sounds good. I guess I can now cut one extra RuboCop release to see if we didn't break anything with the extraction for some external gem.

from rubocop-ast.

marcandre avatar marcandre commented on May 23, 2024

That's something I want to add to the github actions... testing with earliest compatible rubocop release (not just master)

from rubocop-ast.

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.