• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • support-core-plugin
    • None

      The AboutJenkins class is huge (>1000 lines) and coverage in AboutJenkinsTest consists of a single function mayBeDateSmokes.

      I'm trying to improve the output of the AboutJenkins code, and potentially improve the sanitization. But in order to do that (and not be laughed at by my colleagues), I need to be able to write tests for the pieces of code I'm changing. As is, AboutJenkins isn't practically testable in small units because everything is hidden in private class or private static.

      I understand that people may have pending pull requests (they should get them merged) and they may have code which depends on minute details of how this code works.

      If they care, they should get their changes merged and then help write tests documenting their expectations which would make it easier for future contributors to understand the constraints the code lives with when they write changes.

          [JENKINS-54920] Refactor AboutJenkins class

          Josh Soref added a comment -

          For reference, my current proposal is here: https://github.com/jsoref/support-core-plugin/tree/refactor

          I won't make a PR for it until jenkinsci/support-core-plugin#155 is merged

          Josh Soref added a comment - For reference, my current proposal is here: https://github.com/jsoref/support-core-plugin/tree/refactor I won't make a PR for it until jenkinsci/support-core-plugin#155  is merged

            allan_burdajewicz Allan BURDAJEWICZ
            jsoref Josh Soref
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: