Coder Social home page Coder Social logo

Comments (23)

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 16-Oct-2011 3:32pm

We should validate all .groovy files found in src directory. The budget for this task is 2 hours (including unit test and integration test). If this budget won't be enough you can use PDD mechanism to break the task onto parts.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 17-Oct-2011 3:12pm

Pavlo, this task is for you. Let's discuss first, if something is not clear.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 17-Oct-2011 7:03pm

We should create a new module: qulice-codenarc, where this tool has to be used (similar to qulice-pmd, qulice-checkstyle, etc.)

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 18-Oct-2011 12:33pm

understood. I see that module will contain implementation of Validator interface. CodeNarc has conception of rules - http://codenarc.sourceforge.net/codenarc-rule-index.html.
Rules should be described in a xml file.
We should have property in settings with path to this file.
What kind of classes/resources do u think could be also in the module? I see for the moment - CodeNarcValidator, maybe some kind of rules loader and rules xml file.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 18-Oct-2011 5:45pm

Yes, you're right, we should create CodeNarcValidator implements Validator class. I think that XML with rules should be kept in qulice-codenarc/src/main/resources/com/qulice/codenarc/rules.xml, and loaded as a resource (by codenarc itself or by us).

That's it. One class and one resource will be enough, as I see it. And of course a unit test and an integration test in qulice-maven-plugin/it, to make sure it works.

ps. In the future, don't forget to re-assign the ticket to me back, when you need my answer/attention.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 19-Oct-2011 8:17am

In [99/qulice]:

#CommitTicketReference repository="qulice" revision="99"
refs #7 - new branch

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 20-Oct-2011 1:02pm

In [114/qulice]:

#CommitTicketReference repository="qulice" revision="114"
refs #7 - codenarc module validation, testcase,rules file

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 23-Oct-2011 4:50pm

Yegor, could review code which was committed pls. I wasnt able to test integration-test because of that problem with common-loggins and cyclops groups, even if I remove these from m2 repository errors appears when running qulice-maven-plugin

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 24-Oct-2011 7:36am

Looks good, but there are a few problems:

  1. Why do we need setters/getters in the validator? In general, it's a bad practice - try to avoid using setters/getters at all. Params should be passed through constructor and should NOT be exposed by getters.
  2. Where is ruleset.xml? You forgot to commit it?
  3. We won't allow our users to configure our validators. Ruleset will be always be used from our internal file. Thus, there won't be any "defaults". The validator should work as a black box, with very limited configuration options (see other validators).
  4. Try to run mvn -Dci verify, you will see checkstyle errors that should be fixed before I can merge your branch into trunk

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 24-Oct-2011 8:37am

1,3,4 - ok, understood will correct
2 - I have put StarterRuleSet-AllRulesByCategory.groovy with all rules as given on codenarck docs

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 24-Oct-2011 8:53am

OK, got it. But why do you use ruleset.xml in CodenarcValidator? Anyway, let's refactor as explained above and take a look again.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 25-Oct-2011 1:58pm

In [144/qulice]:

#CommitTicketReference repository="qulice" revision="144"
refs #7 - refactoring, 1 hour spent

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 26-Oct-2011 7:57am

1,2,3,4 - refactored.
I have put initialization of all settings inside.Take a look pls and let me know if something to correct there.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 26-Oct-2011 12:13pm

Looks much better now, but:

  1. Why do you need a HTML report writer? We don't need a report, just a list of violations reported through Logger (see other validators)
  2. You don't report violations now, just a summary of how many of them we have. It's not enough. We should see a list of reports.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 26-Oct-2011 12:30pm

Ok, understood. Will correct it shortly.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 27-Oct-2011 4:40pm

In [174/qulice]:

#CommitTicketReference repository="qulice" revision="174"
refs #7 - refactoring, 30 minutes spent

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by pshamrai on 27-Oct-2011 4:44pm

Please take a look on final corrections and let me know if smth else is needed here.

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 27-Oct-2011 4:52pm

Looks good! Let me try to merge..

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by guard on 27-Oct-2011 4:59pm

In [175/qulice]:

#CommitTicketReference repository="qulice" revision="175"
refs #7 - /branches/ticket7 merged into /trunk, 2 hours spent

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by guard on 27-Oct-2011 4:59pm

In [176/qulice]:

#CommitTicketReference repository="qulice" revision="176"
refs #7 - /branches/ticket7 successfully closed

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 28-Oct-2011 8:39pm

Thanks a lot!

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor256 on 22-Jan-2012 11:39pm

Milestone PROTOTYPE deleted

from qulice.

yegor256 avatar yegor256 commented on June 14, 2024

migrated from Trac, where originally posted by yegor on 21-Apr-2013 12:03pm

we moved to Github

from qulice.

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.