Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-26147

Ruff integration roadmap

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.0.0
    • None
    • ambari-trunk
    • None

    Description

      The entire Ambari project has accumulated a large amount of Python code, which is the result of the collective efforts of multiple contributors to make Ambari better. 

      ===============================================================================
       Language            Files        Lines         Code     Comments       Blanks
      ===============================================================================
       Java                 3330       690679       427116       156389       107174
       JavaScript           2125       512742       374238        87081        51423
       Plain Text             68       500082            0       497409         2673
       JSON                  758       479988       479689            0          299
       Python               1096       218057       175499         9547        33011   <=== here
       XML                  1135       156581       130300        20189         6092

      During this process, a problem has emerged: everyone has different coding styles, which leads to inconsistencies in the submitted code. This can result in various inconveniences, such as increased understanding costs of the underlying principles and greater difficulty in identifying the root causes of issues. As the codebase grows, these problems become increasingly apparent. Therefore, we are introducing ruff, along with some additional processes, to format the code and alleviate these issues.

      What is Ruff?

      An extremely fast Python linter and code formatter, written in Rust. Its speed is one of its advantages. More information can be found here: ruff.

      Roadmap

      • Introduce Ruff into Ambari and preset rules, then manually execute the formatting command.
      • ntegrate Ruff checker into Jenkins, checker that fails will block the merge process.
      • Integrate pre-commit hooks.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zrain zrain
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: