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

New template rule: AvoidProhibitedMethodInvocation #38

Merged
merged 3 commits into from
Jan 25, 2022
Merged

New template rule: AvoidProhibitedMethodInvocation #38

merged 3 commits into from
Jan 25, 2022

Conversation

dykov
Copy link
Collaborator

@dykov dykov commented Jan 22, 2022

Description

The rule is conteined in the arch4u-template-ruleset.xml ruleset.
A new rule has been implemented to check if the prohibited methods of the specified class are used.
Example:

class Foo {
    void bar(Object obj) {
        String s = obj.toString();  //violation
    }
}

Completed work

  • Added new rule
  • Added new unit tests
  • Passed all checks

Related issues:

Implements #22

@dykov dykov added the enhancement New feature or request label Jan 22, 2022
@dykov dykov linked an issue Jan 22, 2022 that may be closed by this pull request
@dgroup
Copy link
Owner

dgroup commented Jan 24, 2022

@dykov please change the version in pom.xml to 0.0.0, it will be updated automatically during release stage

pom.xml Outdated Show resolved Hide resolved
@dgroup
Copy link
Owner

dgroup commented Jan 25, 2022

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jan 25, 2022

@rultor merge

@dgroup OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jan 25, 2022

@rultor merge

@dgroup @dykov Oops, I failed. You can see the full log here (spent 20s)

+ set -e
+ set -o pipefail
++ dirname ./run.sh
+ cd .
+ echo 13511
+ echo '1.70.6 5bcc93e7c'
1.70.6 5bcc93e7c
+ date
Tue Jan 25 21:09:09 CET 2022
+ uptime
 21:09:09 up 485 days,  6:15,  0 users,  load average: 4.44, 4.52, 4.60
+ cat
8DF36117-arch4u-pmd_pubring.gpg on master does not exist.
+ exit -1
'cid' file is absent, container wasn't started correctly

@dgroup
Copy link
Owner

dgroup commented Jan 25, 2022

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jan 25, 2022

@rultor merge

@dgroup OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit cbdcd34 into dgroup:master Jan 25, 2022
@rultor
Copy link
Collaborator

rultor commented Jan 25, 2022

@rultor merge

@dgroup Done! FYI, the full log is here (took me 2min)

@dykov dykov added the new rule label Feb 4, 2022
@dykov dykov deleted the feature/22 branch February 5, 2022 23:11
@dgroup dgroup modified the milestone: 0.1.0 Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XPath: Template to prohibit usage of methods from particular class
3 participants