Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworking the syntax checker #66

Closed
5 tasks done
OwlyCode opened this issue May 29, 2019 · 5 comments
Closed
5 tasks done

Reworking the syntax checker #66

OwlyCode opened this issue May 29, 2019 · 5 comments
Assignees
Milestone

Comments

@OwlyCode
Copy link
Collaborator

OwlyCode commented May 29, 2019

I'm currently reworking the way Twigcs handles basic style checks like counting the number of spaces, checking that something is lowercased etc... It will be a separated engine that can works along the unused macros/variable checkers. At the moment it is called "RegEngine" because it heavily uses regular expression.

The branch: https://github.com/OwlyCode/twigcs/commits/experimental

I expect this rework to fix the following issues :

@OwlyCode OwlyCode changed the title Reworking the way spaces are checked Reworking the syntax checker May 29, 2019
@OwlyCode OwlyCode self-assigned this May 29, 2019
@OwlyCode
Copy link
Collaborator Author

This landed in the master branch. I will manage to get some time for a beta release, hopefully next week!

@stof
Copy link
Contributor

stof commented Jul 8, 2019

please also describe the upgrade guide (our current ruleset file references classes which are removed by your refactoring).

@OwlyCode
Copy link
Collaborator Author

Here's a quick update: I'm still working on this! I have had less time lately (became CTO at my workplace) but kept working on the rewrite.

The new engine is completed and fixes all the problems listed above and also prepares for the future (like arrow functions support). It sleeps in the master, waiting to be tagged for beta. I just added a branch with a quick method for configuring the engine for simpler needs that should be merged in september.

Next steps are:

  • Finishing the quick configuration system.
  • Writing the new documentation
    • how to upgrade a ruleset from a previous version?
    • Basic: how to customize the new engine using quick configuration?
    • Advanced: how to write a fully customized ruleset?
  • Cleaning some classes now that major changes should no longer be required.
  • Shipping a beta so you can tell me if some of your needs are still unadressed.

Thank you for using Twigcs, and thank you for your patience!

@OwlyCode
Copy link
Collaborator Author

All is done, we should be ready for 4.0-beta soon!

@oallain
Copy link
Contributor

oallain commented Oct 19, 2019

Really nice work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants