Skip to content

Commit 0e27080

Browse files
ShabiShett07anandkaranubc
authored andcommitted
docs: add FAQ for linting errors
PR-URL: stdlib-js#6157 Co-authored-by: Karan Anand <[email protected]> Signed-off-by: Karan Anand <[email protected]> Signed-off-by: Shabareesh Shetty <[email protected]> Reviewed-by: Karan Anand <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 7f0de3c commit 0e27080

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

docs/contributing/FAQ.md

+33-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ limitations under the License.
2727
- [How can I set up my development environment to contribute to stdlib?](#setup-dev-environment)
2828
- [How can I install cppcheck?](#install-cppcheck)
2929
- [I am seeing different return values in the JavaScript and C implementation for the same implementation.](#js-vs-c-return-values)
30-
- [What should I do if Markdown linting on my commits fails because my headings exceed the maximum permissible length?](#markdown-heading-length)
30+
- [What should I do if linting on my commits fails because my headings or lines exceed the maximum permissible length?](#markdown-heading-length)
31+
- [What should I do if JavaScript linting on my commits fails because my function exceeds the maximum permissible number of parameters?](#max-params)
3132
- [I have opened a pull request, where can I seek feedback?](#pr-feedback)
3233
- [I need to generate fixtures for my tests. How can I do that, and what are the best references for inspiration?](#generate-fixtures)
3334
- [I am facing a `Shadowed declaration` linting error in my C files, how can I fix it?](#shadowed-declaration)
@@ -64,8 +65,6 @@ There are primarily two options for setting up your development environment to c
6465

6566
Note: The dev container does not yet support ARM64 architectures. For more information, or if you're interested in adding ARM64 support, you can visit this [issue][devcontainer-issue].
6667

67-
TODO: Modify the dev container setup link to the exact file link once it is merged.
68-
6968
<a name="install-cppcheck"></a>
7069

7170
## How can I install cppcheck?
@@ -101,15 +100,37 @@ If they pass, adjust the tolerance and add a note to the C tests indicating that
101100

102101
<a name="markdown-heading-length"></a>
103102

104-
## What should I do if Markdown linting on my commits fails because my headings exceed the maximum permissible length?
103+
## What should I do if linting on my commits fails because my headings or lines exceed the maximum permissible length?
104+
105+
Consider whether the heading/line can be shortened by renaming variables (e.g., changing `strideX` to `sx`). If shortening is not possible, disable the lint rule at the top level using:
106+
107+
- For JavaScript files:
105108

106-
Consider whether the heading can be shortened by renaming variables (e.g., changing `strideX` to `sx`). If shortening is not possible, disable the lint rule at the top level using:
109+
```javascript
110+
// eslint-disable-line max-len
111+
```
112+
113+
[Reference Comment][javascript-len-ref]
114+
115+
- For Markdown files:
107116

108117
```markdown
109118
<!-- lint disable maximum-heading-length -->
110119
```
111120

112-
TODO: Can we add a reference PR link?
121+
[Reference Comment][markdown-len-ref]
122+
123+
<a name="markdown-heading-length"></a>
124+
125+
## What should I do if JavaScript linting on my commits fails because my function exceeds the maximum permissible number of parameters?
126+
127+
Consider whether the number of parameters can be reduced. If reduction is not possible, disable the lint rule at the top level using:
128+
129+
```javascript
130+
// eslint-disable-line max-params
131+
```
132+
133+
[Reference Comment][javascript-params-ref]
113134

114135
<a name="pr-feedback"></a>
115136

@@ -386,6 +407,12 @@ For more `make` commands, refer to the [documentation][benchmark] on running ben
386407

387408
[make-commands]: https://github.com/stdlib-js/stdlib/tree/develop/tools/make/lib
388409

410+
[markdown-len-ref]: https://github.com/stdlib-js/stdlib/blob/78e0cfd8b6c0429a443b07fd39fa9dd53bf44d23/lib/node_modules/%40stdlib/lapack/base/dgttrf/README.md?plain=1#L94
411+
412+
[javascript-len-ref]: https://github.com/stdlib-js/stdlib/blob/78e0cfd8b6c0429a443b07fd39fa9dd53bf44d23/lib/node_modules/%40stdlib/lapack/base/dgttrf/lib/base.js#L111
413+
414+
[javascript-params-ref]: https://github.com/stdlib-js/stdlib/blob/78e0cfd8b6c0429a443b07fd39fa9dd53bf44d23/lib/node_modules/%40stdlib/lapack/base/dgttrf/lib/base.js#L75
415+
389416
</section>
390417

391418
<!-- /.links -->

0 commit comments

Comments
 (0)