Comments (23)
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.
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.
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.
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.
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.
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.
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.
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.
migrated from Trac, where originally posted by yegor256 on 24-Oct-2011 7:36am
Looks good, but there are a few problems:
- 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.
- Where is
ruleset.xml
? You forgot to commit it? - 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).
- 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.
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.
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.
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.
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.
migrated from Trac, where originally posted by yegor256 on 26-Oct-2011 12:13pm
Looks much better now, but:
- 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) - 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.
migrated from Trac, where originally posted by pshamrai on 26-Oct-2011 12:30pm
Ok, understood. Will correct it shortly.
from qulice.
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.
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.
migrated from Trac, where originally posted by yegor256 on 27-Oct-2011 4:52pm
Looks good! Let me try to merge..
from qulice.
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.
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.
migrated from Trac, where originally posted by yegor256 on 28-Oct-2011 8:39pm
Thanks a lot!
from qulice.
migrated from Trac, where originally posted by yegor256 on 22-Jan-2012 11:39pm
Milestone PROTOTYPE deleted
from qulice.
migrated from Trac, where originally posted by yegor on 21-Apr-2013 12:03pm
we moved to Github
from qulice.
Related Issues (20)
- IllegalArgumentException leads to execution failure HOT 7
- Java 17 record type not supported HOT 6
- JUnit test class must be final HOT 1
- method parameter must not hide field of the class HOT 1
- this qualifier must be required even inside lambda HOT 1
- How to Choose Google checks instead of Sun Checks (Checkstyle)? HOT 1
- BranchContains.java:44: Avoid branchContains usages in...
- EqualsTree.java:46: Avoid equalsTree usages in checks and... HOT 1
- PmdListener.java:88-89: If was added to avoid failing...
- PmdValidatorTest.java:130-131: Replace not+empty() with...
- Rebuild GitHub Pages HOT 4
- PMD.AvoidAccessToStaticMembersViaThis check works incorrectly HOT 4
- `java.lang.NullPointerException` at `com.qulice.checkstyle.DiamondOperatorCheck.isDiamondOperatorUsed` HOT 3
- check failed: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Failed to process files for 0.22.1 HOT 1
- add a rule to check that affirm is used for Assertion HOT 9
- diamond operator check gives false positive HOT 3
- PMD UseUnderscoresInNumericLiterals rule gives false positives on non-divisible number into even 3 digit parts HOT 3
- prohibit private constructors if they are not used in the class HOT 2
- ignore binary files automatically HOT 1
- PMD exception in Java source with variables or methods named with unicode characters for Windows workflow HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qulice.