question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is that possible to include custom rule from current project?

See original GitHub issue

Readme states two ways how to add custom rules

buildscript {
    dependencies {
        classpath files('libs/my-custom-ktlint-rules.jar')
        classpath 'org.other.ktlint:custom-rules:1.0'
    }
}

I’d like to have custom rules as separate module in my project. Is that possible to include them directly? Ideally, I’d like that these rules are applied against themselves as well.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremymailencommented, Sep 6, 2022

It might take a little bit, since the upgrade to ktlint 0.47.x is up next. This would be a bigger change and require careful consideration.

1reaction
jeremymailencommented, May 20, 2022

Let me reopen. There’s a PR out proposing this. I think it will need some careful testing, but I might have become paranoid about gradle workers 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize a rule set - Visual Studio - Microsoft Learn
Create a custom rule set from an existing rule set · In Solution Explorer, right-click the project and then select Properties. · On...
Read more >
How to Create Custom ESLint Rules (It's Not as Hard as You ...
Run the command npm i -D eslint-plugin-xgh to install the ESLint plugin that wraps the no-testing rule. All you have to do now...
Read more >
Create custom ESLint rules in 2 minutes - Webiny
Inside your project folder, create a folder. · Then we also create an index. · Once you're done, in your project root, add...
Read more >
Custom rule examples - Semgrep
You can use Semgrep and its GitHub integration to automate PR comments that you frequently make in code reviews. Writing a custom rule...
Read more >
Can't add more than one custom field to a rule - Tips and Tricks
This is, in fact, intended functionality as you guessed! As Rules are project based, you will only be able to select one custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found