dgroup / docker-unittests

Testing of base docker images during CI/CD process
MIT License
35 stars 4 forks source link

SafeSetTest.java:36-37: Add de.thetaphi:forbiddenapis in... #200

Open 0pdd opened 5 years ago

0pdd commented 5 years ago

The puzzle DEV-cd8ed1c6 from #DEV has to be resolved:

https://github.com/dgroup/docker-unittests/blob/4c0b88404b1bbc04e30efed5decdd31d16e0ab58/src/test/java/com/github/dgroup/dockertest/collection/SafeSetTest.java#L36-L37

The puzzle was created by dgroup on 25-Dec-18.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be \"done\" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

bodax commented 5 years ago

@dgroup -I must to add this dependency to pom.xml and -when I build the project to use some option for forbid using of static matchers?

dgroup commented 5 years ago

@bodax de.thetaphi:forbiddenapis is a plugin which allows forbidding the usage of particular classes by the pattern. So, you need

  1. Add the mvn plugin to the pom.xml
  2. Add the file where you'll specify the forbidden patterns.
  3. Restrict Matchers.equalTo(xxx) in favour to new IsEqual<>(xxx)
  4. Raise review
  5. Fix review comments if any.
bodax commented 5 years ago

@dgroup I don't know how to do a signature file checkers. and didn't search it.

  1. I used these link https://github.com/policeman-tools/forbidden-apis/wiki/BundledSignatures and it was cause of some check problems, which i didn't fix.