Joey Armstrong | bb26e93 | 2024-01-29 16:17:27 -0500 | [diff] [blame] | 1 | .. _code--makefile-lint-targets: |
Joey Armstrong | fb8f3c8 | 2024-01-29 10:13:18 -0500 | [diff] [blame] | 2 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 3 | ====================================== |
| 4 | Makefile Lint Targets: Syntax Checking |
| 5 | ====================================== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 6 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 7 | Targets |
| 8 | ======= |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 9 | |
| 10 | .. code:: bash |
| 11 | |
| 12 | git clone ssh://gerrit.opencord.org:29418/voltha-helm-charts.git |
| 13 | cd voltha-helm-charts |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 14 | make help | grep lint |
| 15 | lint-chart chart_version_check.sh |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 16 | lint-doc8 Syntax check *.rst documentation files. |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 17 | lint-helm Syntax check helm configs |
| 18 | lint-json Syntax check json sources |
| 19 | lint-license Verify sources contain a license block. |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 20 | lint-robot Syntax check robot sources using rflint |
| 21 | lint-shell Syntax check bash,bourne,etc sources |
| 22 | lint-yaml Syntax check yaml source using yamllint |
| 23 | UNSTABLE= Build targets prone to failure (lint-helm) |
| 24 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 25 | [PYTHON] |
Joey Armstrong | a2fa658 | 2023-04-07 11:03:36 -0400 | [diff] [blame] | 26 | lint-python Syntax check using available python tools |
| 27 | lint-flake8 Syntax check using tool flake8 |
| 28 | lint-pylint Syntax check using tool pylint |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 29 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 30 | | |
| 31 | |
Joey Armstrong | 8218059 | 2024-02-10 15:34:21 -0500 | [diff] [blame] | 32 | .. seealso:: |
| 33 | |
| 34 | - :ref:`Makefile Target lint-chart` |
| 35 | - :ref:`Makefile Target lint-helm` |
| 36 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 37 | |
| 38 | All Sources |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 39 | =========== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 40 | |
| 41 | The generic lint target can be used to invoke all defined lint targets. |
| 42 | |
| 43 | .. code:: bash |
| 44 | |
| 45 | make clean |
| 46 | make lint 2>&1 | tee log |
| 47 | |
| 48 | | |
| 49 | |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 50 | |
| 51 | Makefile help |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 52 | ============= |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 53 | |
Joey Armstrong | bd6cc3d | 2023-01-09 19:52:12 -0500 | [diff] [blame] | 54 | Individual Makefiles support a help target that will display a list of |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 55 | targets and functionality supported. |
| 56 | |
| 57 | .. code:: bash |
| 58 | |
| 59 | make help |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 60 | make help | grep {topic} |
| 61 | |
| 62 | .. list-table:: help |
| 63 | :widths: 20, 60 |
| 64 | :header-rows: 1 |
| 65 | |
| 66 | * - Make Target |
| 67 | - Description |
| 68 | * - help |
| 69 | - Display available help for targets and flags |
| 70 | * - make help | lint-{topic} |
| 71 | - Display summary usage for lint-doc8, lint-license, lint-make |
| 72 | * - lint-{topic}-help |
| 73 | - Display extended help for a topic, supported makefile targets, etc |
| 74 | |
| 75 | Legacy Help Usage |
| 76 | ----------------- |
| 77 | |
| 78 | .. code:: bash |
| 79 | |
| 80 | make help |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 81 | make help-verbose |
| 82 | make help VERBOSE=1 |
| 83 | |
| 84 | | |
| 85 | |
| 86 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 87 | doc8 / restructuredText (rst) |
| 88 | ============================= |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 89 | |
| 90 | Command: `doc8 <https://pypi.org/project/doc8/>`_ |
| 91 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 92 | .. list-table:: Makefile Targets |
| 93 | :widths: 20, 60 |
| 94 | :header-rows: 1 |
| 95 | |
| 96 | * - Target |
| 97 | - Description |
| 98 | * - help |
| 99 | - Display item ``lint-doc8`` as a summary help topic item. |
| 100 | * - lint-doc8-help |
| 101 | - Display extended help for ``lint-doc8`` targets |
| 102 | * - |
| 103 | - |
| 104 | * - lint-doc8 |
| 105 | - Build system lint target used to syntax check restructuredText sources. |
| 106 | * - lint-doc8-all |
| 107 | - Filesystem traversal, check all ``*.rst`` sources. |
| 108 | * - lint-doc8-mod |
| 109 | - Syntax check locally modified files (~git status) |
| 110 | * - lint-doc8-src |
| 111 | - Syntax check a list of files passed in as an argument. |
| 112 | * - |
| 113 | - |
| 114 | * - lint-doc8-install |
| 115 | - Dependency driven installation of the doc8 tool. |
| 116 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 117 | .. code:: bash |
| 118 | |
| 119 | make clean |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 120 | make lint-doc8 2>&1 | tee log |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 121 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 122 | make lint # supported by repositories that define lint-doc8 as a default target. |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 123 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 124 | .. list-table:: Sources |
| 125 | :widths: 20, 60 |
| 126 | :header-rows: 1 |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 127 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 128 | * - Source |
| 129 | - Description |
| 130 | * - `makefiles/lint/doc8/include.mk <http://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/doc8/include.mk>`_ |
| 131 | - Main makefile logic for syntax checking RST sources. |
| 132 | * - `makefiles/lint/doc8/install.mk <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/doc8/install.mk>`_ |
| 133 | - Dependency logic to install the doc8 tool when needed. |
| 134 | * - `makefiles/lint/doc8/excl.mk <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/doc8/install.mk>`_ |
| 135 | - Common doc8 exclusion patterns for all repositories. |
| 136 | |
| 137 | See Also |
| 138 | -------- |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 139 | |
Joey Armstrong | 1b8fdc3 | 2023-12-20 17:22:57 -0500 | [diff] [blame] | 140 | - lint-doc8-all target dependency will create a `python virtual env <https://wiki.opencord.org>`_ |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 141 | - python 3.10+ requires `virtual env patching <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master/patches/>`_ (dynamic, applied when needed). |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 142 | - `makefiles/patches/include.mk <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master/makefiles-orig/patches/>`__ |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 143 | |
| 144 | | |
| 145 | |
| 146 | |
| 147 | python: flake8 |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 148 | ============== |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 149 | |
| 150 | Command: `flake8 <https://flake8.pycqa.org/en/latest>`_ |
| 151 | |
| 152 | .. code:: bash |
| 153 | |
| 154 | make clean |
| 155 | make lint 2>&1 | tee log |
| 156 | make lint-flake8-all 2>&1 | tee log |
| 157 | make lint-flake8-modified 2>&1 | tee log |
| 158 | |
| 159 | Sources: |
| 160 | |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 161 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/>`__ |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 162 | - makefiles/lint/flake8.mk |
| 163 | |
| 164 | Notes: |
| 165 | |
Joey Armstrong | 1b8fdc3 | 2023-12-20 17:22:57 -0500 | [diff] [blame] | 166 | - lint-flake8-all target dependency will create a `python virtual env <https://wiki.opencord.org>`_ |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 167 | - python 3.10+ requires `virtual env patching <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master/patches/>`_ (dynamic, applied when needed). |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 168 | - `makefiles/patches/include.mk <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master/makefiles-orig/patches/>`__ |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 169 | |
| 170 | | |
| 171 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 172 | Helm Charts |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 173 | =========== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 174 | |
| 175 | Command(s): |
| 176 | - `helmlint.sh <https://gerrit.opencord.org/plugins/gitiles/helm-repo-tools/+/refs/heads/master/helmlint.sh>`_ |
| 177 | |
| 178 | .. code:: bash |
| 179 | |
| 180 | make clean |
| 181 | make lint-chart lint-helm 2>&1 | tee log |
| 182 | |
| 183 | Sources: |
| 184 | |
| 185 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/voltha-helm-charts/+/refs/heads/master/makefiles/lint/>`__ |
Joey Armstrong | 2a68795 | 2023-02-01 13:10:12 -0500 | [diff] [blame] | 186 | - `makefiles/lint/helm/include.mk <https://gerrit.opencord.org/plugins/gitiles/voltha-helm-charts/+/refs/heads/master/makefiles/lint/helm/include.mk>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 187 | - [`master <https://gerrit.opencord.org/plugins/gitiles/helm-repo-tools/+/refs/heads/master>`__] `helm-repo-tools <https://gerrit.opencord.org/plugins/gitiles/helm-repo-tools>`_ |
| 188 | |
| 189 | | |
| 190 | |
| 191 | |
| 192 | Golang |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 193 | ====== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 194 | |
| 195 | Command: |
| 196 | |
| 197 | Sources: |
| 198 | |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 199 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/>`__ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 200 | |
| 201 | | |
| 202 | |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 203 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 204 | JSON |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 205 | ==== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 206 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 207 | Command: `json.tool <https://docs.python.org/3/library/json.html>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 208 | |
| 209 | .. code:: bash |
| 210 | |
| 211 | make clean |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 212 | make lint 2>&1 | tee log |
| 213 | make lint-json-all 2>&1 | tee log |
| 214 | make lint-json-modified 2>&1 | tee log |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 215 | |
| 216 | Sources: |
| 217 | |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 218 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/>`__ |
| 219 | - `makefiles/lint/json.mk <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/json.mk>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 220 | |
| 221 | | |
| 222 | |
| 223 | |
| 224 | License / Copyright notice |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 225 | ========================== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 226 | |
| 227 | Command: |
| 228 | |
| 229 | .. code:: bash |
| 230 | |
| 231 | make clean |
| 232 | make lint-license 2>&1 | tee log |
| 233 | |
| 234 | Sources: |
| 235 | |
| 236 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/voltha-system-tests/+/refs/heads/master/makefiles/lint>`__ |
Joey Armstrong | 8b426fc | 2023-11-14 16:09:11 -0500 | [diff] [blame] | 237 | - `makefiles/lint/license.mk <http://gerrit.opencord.org/plugins/gitiles/voltha-system-tests/+/refs/heads/master/makefiles/lint/license/include.mk>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 238 | |
| 239 | | |
| 240 | |
| 241 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 242 | python: pylint |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 243 | ============== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 244 | |
Joey Armstrong | 8b426fc | 2023-11-14 16:09:11 -0500 | [diff] [blame] | 245 | Command: `pylint <http://github.com/pylint-dev/pylint>`_, `pypi.org <https://pypi.org/project/pylint/>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 246 | |
| 247 | .. code:: bash |
| 248 | |
| 249 | make clean |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 250 | make lint 2>&1 | tee log |
| 251 | make lint-pylint-all 2>&1 | tee log |
| 252 | make lint-pylint-modified 2>&1 | tee log |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 253 | |
| 254 | Sources: |
| 255 | |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 256 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/>`__ |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 257 | - makefiles/lint/pylint.mk |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 258 | - `makefiles/patches/include.mk <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master/makefiles-orig/patches/>`__ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 259 | |
| 260 | Notes: |
| 261 | |
Joey Armstrong | bd6cc3d | 2023-01-09 19:52:12 -0500 | [diff] [blame] | 262 | - pylint the --py3k option is no longer supported by v3.10+ |
Joey Armstrong | 1b8fdc3 | 2023-12-20 17:22:57 -0500 | [diff] [blame] | 263 | - lint-pylint-all target dependency will create a `python virtual env <https://wiki.opencord.org>`_ |
Joey Armstrong | bd6cc3d | 2023-01-09 19:52:12 -0500 | [diff] [blame] | 264 | - python 3.10+ requires `virtual env patching <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master/patches/>`_ (dynamic, applied when needed). |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 265 | |
| 266 | | |
| 267 | |
| 268 | |
| 269 | Robot |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 270 | ===== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 271 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 272 | Command: rflint `robotframework-lint <https://pypi.org/project/robotframework-lint/>`_ |
| 273 | |
| 274 | .. code:: bash |
| 275 | |
| 276 | make clean |
| 277 | make lint 2>&1 | tee log |
| 278 | make lint-robot-all 2>&1 | tee log |
| 279 | make lint-robot-modified 2>&1 | tee log |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 280 | |
| 281 | Sources: |
| 282 | |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 283 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/>`__ |
Joey Armstrong | 1eb713f | 2024-01-30 13:53:00 -0500 | [diff] [blame] | 284 | - `makefiles/lint/robot/*.mk <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/robot>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 285 | |
| 286 | | |
| 287 | |
| 288 | |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 289 | Shell / Command Line Scripts |
| 290 | ============================ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 291 | |
| 292 | Command: `shellcheck <https://github.com/koalaman/shellcheck>`_ |
| 293 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 294 | .. code:: bash |
| 295 | |
| 296 | make clean |
| 297 | make lint 2>&1 | tee log |
| 298 | make lint-shell-all 2>&1 | tee log |
| 299 | make lint-shell-modified 2>&1 | tee log |
| 300 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 301 | Sources: |
| 302 | |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 303 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/>`__ |
Joey Armstrong | 8b426fc | 2023-11-14 16:09:11 -0500 | [diff] [blame] | 304 | - `makefiles/lint/shell.mk <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/shell/include.mk>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 305 | |
| 306 | | |
| 307 | |
| 308 | |
| 309 | Yaml |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 310 | ==== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 311 | |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 312 | Command: `yamllint <https://yamllint.readthedocs.io/en/stable/>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 313 | |
| 314 | .. code:: bash |
| 315 | |
| 316 | make clean |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 317 | make lint 2>&1 | tee log |
| 318 | make lint-yaml-all 2>&1 | tee log |
| 319 | make lint--modified 2>&1 | tee log |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 320 | |
| 321 | Sources: |
| 322 | |
Joey Armstrong | 644fb65 | 2023-10-02 13:12:20 -0400 | [diff] [blame] | 323 | - `makefiles/lint <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/>`__ |
| 324 | - `makefiles/lint/yaml.mk <https://gerrit.opencord.org/plugins/gitiles/onf-make/+/refs/heads/master/makefiles/lint/yaml.mk>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 325 | |
| 326 | | |
| 327 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 328 | |
| 329 | Bugs |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 330 | ==== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 331 | |
| 332 | - `jira::VOLTHA <https://jira.opencord.org/projects/VOL>`- |
| 333 | - Include repository URL |
| 334 | - Include gerrit/github changeset if available. |
| 335 | - A logfile snippet of the error and surrounding context. |
| 336 | |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 337 | | |
| 338 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 339 | |
| 340 | Repositories |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 341 | ============ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 342 | |
| 343 | - [`master <https://gerrit.opencord.org/plugins/gitiles/bbsim/+/refs/heads/master>`__] `bbsim <https://gerrit.opencord.org/plugins/gitiles/bbsim>`_ |
| 344 | - [`master <https://gerrit.opencord.org/plugins/gitiles/pod-configs/+/refs/heads/master>`__] `pod-configs <https://gerrit.opencord.org/plugins/gitiles/pod-configs>`_ |
| 345 | - [`master <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master>`__] `voltha-docs <https://gerrit.opencord.org/plugins/gitiles/voltha-docs>`_ |
| 346 | - [`master <https://gerrit.opencord.org/plugins/gitiles/voltha-helm-charts/+/refs/heads/master>`__] `voltha-helm-charts <https://gerrit.opencord.org/plugins/gitiles/voltha-helm-charts>`_ |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 347 | - [`master <https://gerrit.opencord.org/plugins/gitiles/voltha-docs/+/refs/heads/master>`__] `voltha-docs <https://gerrit.opencord.org/plugins/gitiles/voltha-docs>`_ |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 348 | |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 349 | | |
| 350 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 351 | |
| 352 | Notes |
Joey Armstrong | a9a16b6 | 2023-11-01 14:31:15 -0400 | [diff] [blame] | 353 | ===== |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 354 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 355 | - Volume problem reports require cleanup before linting can become a default. |
Joey Armstrong | 4de98b7 | 2023-02-09 14:51:38 -0500 | [diff] [blame] | 356 | |
| 357 | - After bulk linting problems for a language source have been cleaned up |
| 358 | default linting can be enabled by modifing {project-root}/config.mk. |
| 359 | |
Joey Armstrong | a8bc8e1 | 2022-12-04 07:06:59 -0500 | [diff] [blame] | 360 | - Lint target support is globally available across repositories, given time |
| 361 | it will be. Submit patches as needed or open a jira ticket to request |
| 362 | linting support in specific repositories. |
| 363 | - Makefile refactoring: yes absolutely! Baby steps are needed in the interim... |
Joey Armstrong | b544dff | 2022-12-07 15:12:05 -0500 | [diff] [blame] | 364 | |
| 365 | | |