<i id='GsdQb'><tr id='GsdQb'><dt id='GsdQb'><q id='GsdQb'><span id='GsdQb'><b id='GsdQb'><form id='GsdQb'><ins id='GsdQb'></ins><ul id='GsdQb'></ul><sub id='GsdQb'></sub></form><legend id='GsdQb'></legend><bdo id='GsdQb'><pre id='GsdQb'><center id='GsdQb'></center></pre></bdo></b><th id='GsdQb'></th></span></q></dt></tr></i><div id='GsdQb'><tfoot id='GsdQb'></tfoot><dl id='GsdQb'><fieldset id='GsdQb'></fieldset></dl></div>

          <bdo id='GsdQb'></bdo><ul id='GsdQb'></ul>

      1. <tfoot id='GsdQb'></tfoot>
        <legend id='GsdQb'><style id='GsdQb'><dir id='GsdQb'><q id='GsdQb'></q></dir></style></legend>
      2. <small id='GsdQb'></small><noframes id='GsdQb'>

        无法解决 SonarQube 错误“使此行从第 3 列开始"

        时间:2023-07-09
            <legend id='qP3yr'><style id='qP3yr'><dir id='qP3yr'><q id='qP3yr'></q></dir></style></legend>

            <small id='qP3yr'></small><noframes id='qP3yr'>

            • <bdo id='qP3yr'></bdo><ul id='qP3yr'></ul>
                <tbody id='qP3yr'></tbody>

              <i id='qP3yr'><tr id='qP3yr'><dt id='qP3yr'><q id='qP3yr'><span id='qP3yr'><b id='qP3yr'><form id='qP3yr'><ins id='qP3yr'></ins><ul id='qP3yr'></ul><sub id='qP3yr'></sub></form><legend id='qP3yr'></legend><bdo id='qP3yr'><pre id='qP3yr'><center id='qP3yr'></center></pre></bdo></b><th id='qP3yr'></th></span></q></dt></tr></i><div id='qP3yr'><tfoot id='qP3yr'></tfoot><dl id='qP3yr'><fieldset id='qP3yr'></fieldset></dl></div>
              <tfoot id='qP3yr'></tfoot>

                • 本文介绍了无法解决 SonarQube 错误“使此行从第 3 列开始"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 xml(布局、字符串、drawables...)中有很多与此错误有关的行.我尝试将每个列的空间更改为 3,在出现此错误的行中放置 3 个制表符,但在 SonarQube 中仍然出现此错误.我该如何解决这个问题?

                  I am having a lot of lines with this errors in xml (layout, strings, drawables...). I tried to change the space of each colum to 3, to put 3 tabs in the lines that I have this error but I am still having this error in SonarQube. How can I solve this?

                  我在这里举了一个我收到此错误的示例:

                  I put here an example where I am getting this error:

                  <?xml version="1.0" encoding="utf-8"?>
                  <vector xmlns:android="http://schemas.android.com/apk/res/android"
                      android:width="64.42dp"
                      android:height="68.76dp"
                      android:viewportWidth="64.42"
                      android:viewportHeight="68.76">
                      <path
                          android:fillColor="#141412"
                          android:fillType="evenOdd"
                          android:pathData="M38.62,43.24c0.69,0.1,1.2,0.75,2.01,0.86c1.33,0.18,2.57-0.02,3.7-0.77 c1.98-1.33,3.56-3.23,3.66-5.65c0.01-0.34-0.04-1.42-0.04-1.69c0-1.01-0.57-1.32-0.75-2.3c-0.3-1.61,1.23-0.8,1.42,0.33 c-0.13-0.77,0.69-4.28,2.59-2.64c1.63,1.4,0.07,2.82-0.24,4.24c-0.14,0.63-0.45,1.84-0.54,2.48c0,0,0,0-0.01,0 c-0.35,2.33-1.41,4.8-2.95,6.34c-1.35,1.35-3.05,2.76-5.02,2.92c-1.15,0.1-3.25-0.08-4.27-0.66l0.21,0.42 C36.59,47.68,36.57,42.95,38.62,43.24z" />
                      <path
                          android:fillColor="#C31924"
                          android:fillType="evenOdd"
                          android:pathData="M61.69,43.35c0.82-2.66,2.14-11.44,2.28-12.49c0.13-1.05,0.42-2.32,0.45-3.83 c0.03-1.51-1.36-3.05-3.35-3.04c-0.36,0-16.15,0.06-16.92,0.07c-0.52,0-0.66-0.27-0.63-0.56c0.27-2.7,0.8-6.13,0.88-6.58 c0.08-0.41,0.16-0.8,0.17-1c0.02-0.2,0.06-0.49-0.42-0.62c-0.49-0.12-4.1-0.59-21.86-0.5C5.2,14.89,0.91,15.4,0.43,15.53 c-0.49,0.13-0.44,0.42-0.42,0.62c0.01,0.2,0.13,0.7,0.18,0.99c0.07,0.33,0.71,3.87,0.96,6.58c0.68,7.77,1.49,39.99,1.6,41.09 c0.08,0.77,0.31,2.1,1.91,3.03c1.6,0.94,16.85,0.92,17.9,0.91c1.05,0.01,16.3-0.13,17.89-1.09c1.59-0.96,1.81-2.28,1.88-3.05 c0.04-0.41,0.14-5.19,0.15-5.43c0.02-0.25,0.17-0.69,0.63-0.75c0.82-0.1,1.64-0.2,2.9-0.46c3.83-0.79,6.07-2.06,8.61-3.89 C59.28,50.69,60.88,46.02,61.69,43.35 M56.84,43.88c-1.03,2.45-3.81,7.25-8.9,9.07c-1.94,0.7-4.31,1.21-4.71,1.21 c-0.56,0.01-0.63-0.04-0.63-0.39c0-0.36,0.17-9.65,0.21-10.87c0.22-6.95,2.25-12.22,4.9-13.52c0.57-0.28,1.45-0.75,3.89-0.76 c2.95-0.02,6.98-0.03,7.36-0.04c0.38,0,0.66,0,0.66,0.31c0.01,0.44-0.61,4.63-0.67,5.04C58.87,34.35,57.85,41.49,56.84,43.88" />
                      <path
                          android:fillColor="#141412"
                          android:pathData="M24.38,32.2c0,0.97,0.53,1.76,1.16,1.75c0.64,0,1.15-0.79,1.14-1.77c0-0.97-0.53-1.75-1.16-1.75 C24.89,30.44,24.37,31.23,24.38,32.2z" />
                      <path
                          android:fillColor="#141412"
                          android:pathData="M17.59,32.23c0,0.97,0.53,1.76,1.16,1.75c0.64,0,1.15-0.79,1.15-1.77c0-0.97-0.53-1.75-1.16-1.75 C18.1,30.47,17.59,31.26,17.59,32.23z" />
                      <path
                          android:fillColor="#141412"
                          android:pathData="M17.88,35.89c0.01,2.3,1.88,4.15,4.17,4.13c2.29-0.01,4.15-1.88,4.13-4.18" />
                      <path
                          android:fillColor="#D38690"
                          android:fillType="evenOdd"
                          android:pathData="M22.61,1.28c0.61-0.69,1.27-1.36,2.61-1.26c1.32,0.09,2.12,0.97,2.44,1.94 c0.41,1.25-0.12,2.55-0.74,3.34c-1.26,1.59-3.27,2.66-4.27,4.49c-0.54-0.68-1.07-1.39-1.74-2.01c-0.63-0.58-1.34-1.13-1.98-1.77 c-0.61-0.6-1.19-1.35-1.39-2.35c-0.23-1.17,0.11-2.21,0.74-2.84c0.4-0.4,0.98-0.75,1.72-0.81C21.33-0.1,22.05,0.55,22.61,1.28z" />
                  </vector>
                  

                  推荐答案

                  为了遵守使这一行从第 3 列开始"的规则,您必须缩进 2 个空格.

                  To comply with the "Make this line start at column 3" rule, you have to indent you code with 2 spaces.

                  我建议您使用 .editorconfig 文件(参见 EditorConfig)项目的根目录,内容如下:

                  I recommand that you use a .editorconfig file (cf. EditorConfig) at the root of your project with the following content :

                  root = true
                  
                  [*]
                  charset = utf-8
                  end_of_line = lf
                  insert_final_newline = true
                  indent_style = space
                  
                  [*.{java,xml}]
                  trim_trailing_whitespace = true
                  
                  [*.java]
                  indent_size = 4
                  
                  [*.xml]
                  indent_size = 2
                  

                  然后,重新格式化您的文件

                  and then, to reformat your file

                  这篇关于无法解决 SonarQube 错误“使此行从第 3 列开始"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:SonarQube 无法解析包含任何故障的 TEST-report.xml 下一篇:测量两个 iOS 设备之间的距离

                  相关文章

                  <small id='UrcFr'></small><noframes id='UrcFr'>

                    <bdo id='UrcFr'></bdo><ul id='UrcFr'></ul>
                  <legend id='UrcFr'><style id='UrcFr'><dir id='UrcFr'><q id='UrcFr'></q></dir></style></legend>

                    1. <i id='UrcFr'><tr id='UrcFr'><dt id='UrcFr'><q id='UrcFr'><span id='UrcFr'><b id='UrcFr'><form id='UrcFr'><ins id='UrcFr'></ins><ul id='UrcFr'></ul><sub id='UrcFr'></sub></form><legend id='UrcFr'></legend><bdo id='UrcFr'><pre id='UrcFr'><center id='UrcFr'></center></pre></bdo></b><th id='UrcFr'></th></span></q></dt></tr></i><div id='UrcFr'><tfoot id='UrcFr'></tfoot><dl id='UrcFr'><fieldset id='UrcFr'></fieldset></dl></div>
                      <tfoot id='UrcFr'></tfoot>