Giter Site home page Giter Site logo

Issue while adding a new rule about tailor HOT 2 OPEN

vickyrocky avatar vickyrocky commented on June 12, 2024
Issue while adding a new rule

from tailor.

Comments (2)

alykhank avatar alykhank commented on June 12, 2024

According to Arrays, this exception occurs if from > to in the call to copyOfRange() which is likely the call occurring here. From what I would guess without seeing your code, your custom rule is not printing any/enough output, so when the test tries to strip the boilerplate output (file path and summary), there are less lines than expected.

from tailor.

vickyrocky avatar vickyrocky commented on June 12, 2024

Hi @alykhank ,

Thanks for your response! I got to know that but i was unable to sort it out as there is no proper documentation regarding adding a new rule. So if possible can you please list down steps to introduce new rule that would be very helpful for other people as well. I am listing down the steps which i have figured out for my requirement so if any correction is required please let me know:

**Steps-1:**Added logic file in this directory tailor/src/main/java/com/sleekbyte/tailor/listeners/NoHardcoded.java

Steps-2:Added unit test file in this directory tailor/src/test/java/com/sleekbyte/tailor/functional/NoHardcodedTest.java

Steps-3:Added test swift file in this directory tailor/src/test/swift/com/sleekbyte/tailor/functional/NoHardcodedTest.swift

Steps-4:Added rule message in tailor/src/main/java/com/sleekbyte/tailor/common/Messages.java

Steps-5:Registered rule in tailor/src/main/java/com/sleekbyte/tailor/common/Rules.java

This i have followed and my requirement is that if there is any stringliteral inside the code i have to find and raise the issue.

from tailor.

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.