Code Monkey home page Code Monkey logo

Comments (2)

boakley avatar boakley commented on September 6, 2024

This sounds difficult to do right, plus I think it's sometimes reasonable
to have test cases that are identical except for the final validation step.

There is a school of thought that a test case should test only one thing.
So, for example, I may have a test for a file parser that parses the file
and then verifies that the return code is zero. I might have another test
that also parses the file and then verifies that it doesn't print anything
to stdout. These two tests would be identical except for the name,
documentation string, and final keyword. Though, maybe because of that your
rule wouldn't be triggered?

Testing for duplicate documentation and duplicate names might be the better
way to go. I know we have the problem that people will cut and pasted a
whole test case, modify the final verification, but forget to update the
documentation.

On Thu, Dec 11, 2014 at 4:45 PM, Guy Kisel [email protected] wrote:

I was thinking it would be nice to have a rule that warns about code
duplication, or about the potential to pull reused code out into a separate
keyword.

I've made an initial attempt at it, but I was wondering if anyone else
thinks this seems like something worth doing, or if it would just raise too
many false positives to be useful.

guykisel/robotframework-lint@7412f5c
guykisel@7412f5c


Reply to this email directly or view it on GitHub
#16.

from robotframework-lint.

guykisel avatar guykisel commented on September 6, 2024

That's a good point. Looking for duplicate documentation seems reasonable, and it would be pretty easy to adapt my code to do that instead. All I'm really doing is using difflib to compute a similarity ratio.

from robotframework-lint.

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.