• Czar

    Czar

    3 years ago
    Is there a way to enforce indent tabs instead of spaces? EDIT --- So far my research on the matter shows that there is no way to use tabs with either detekt or ktlint. I get the desire to avoid indent-wars, but this effectively prevents teams with existing code bases and style guides based on tabs to use either detekt or ktlint, or forces them to disable all the relevant rule(set)s and write their own. Plainly that sucks 😞
    Czar
    m
    +3
    19 replies
    Copy to Clipboard
  • r

    robstoll

    3 years ago
    is there a way to mark a function as part of a builder so that detekt can recognise if one forgot to end the building process?
    r
    s
    5 replies
    Copy to Clipboard
  • gammax

    gammax

    3 years ago
    gammax
    Czar
    24 replies
    Copy to Clipboard
  • a

    Anthony f

    3 years ago
    Does anyone knows where I can find the list of correctable rules ?
    a
    1 replies
    Copy to Clipboard
  • a

    Anthony f

    3 years ago
    @gammax yes
    a
    2 replies
    Copy to Clipboard
  • xenomachina

    xenomachina

    3 years ago
    Is there a way to use detekt to find unused
    internal
    (rather than
    private
    ) properties?
    xenomachina
    m
    3 replies
    Copy to Clipboard
  • s

    Suraj Bokey

    3 years ago
    Does anyone tries to change the indentation to 2. I have tried in config file but looks like detekt is not considering anything from “Formatting Block”
    formatting:
      active: true
      android: false
      autoCorrect: true
      ImportOrdering:
        active: false
        autoCorrect: true
      Indentation:
        active: true
        autoCorrect: true
        indentSize: 2
        continuationIndentSize: 2
    s
    1 replies
    Copy to Clipboard
  • dr.dreigh

    dr.dreigh

    3 years ago
    when I see something like this online

    https://gauthamprabhuk.files.wordpress.com/2014/12/cyclomatic-complexity-numbers.png

    it's making me think I need to do a lot of refactoring
    dr.dreigh
    1 replies
    Copy to Clipboard
  • dr.dreigh

    dr.dreigh

    3 years ago
    But I guess that is the score for a method? What is the project score I got of
    68
    in relation to?
    dr.dreigh
    1 replies
    Copy to Clipboard
  • dr.dreigh

    dr.dreigh

    3 years ago
    Thanks for the replies Artur. This makes sense, I had a look at the
    AbstractProcessor.kt
    and thought it may add up the complexity of all the methods of all the files. Our score of 68 is only over 39 functions, so it seems low enough - it's a new service, so fairly small. What do you think about reporting on average McCabe complexity per method in the detekt report? As the sum is only relevant to the project, but an average would be comparable to other applications.
    dr.dreigh
    1 replies
    Copy to Clipboard