This is a rather rudimentary checker using only the builtin 'parse'
function of R. It can only report syntax/parsing errors, but it does not
depend on any third-party libraries.
R actually has some builtin utilities for linting (for example,
'codetools'), but as far as I know those require evaluating the source
code, so only 'parse' is used.
1. Add FlyC
The existing 'FlyC' mode line indicator had two meanings
- current buffer has not been checked, or
- last check resulted in no warnings and no errors
and the manual indicated that it was the later which I found confusing.
This commit, defines:
FlyC This buffer has not been checked yet.
FlyC:0 Last check resulted and no errors and no warnings.
Also add colors to the mode line status indicator:
- FlyC:0 use 'success face
- FlyC:3|5 use 'error face
- FlyC! use 'error face
Note: The :0 is configurable and can be changed via `flycheck-mode-success-indicator'.
2. Update the mode menu to add
- "Run checker as compile command" which is `flycheck-compile'.
This is helpful for multiline errors coming from compilers such as clang.
Also updated the `flycheck-compile' prompt to show the default checker when
there is one because typing only RET will run the default checker.
- "Flycheck quick help" which runs new sub, `flycheck-quick-help' and displays
what the mode line indicators mean along with some of the more common
key bindings.
The docstring generated for flycheck-stylelintrc includes each of its
checkers, ending up 87 characters long. I restricted its definition to print
only the first three (of 4) checkers, which is enough to fix it, though we
might want to consider putting this limit in the macro that generates the
docstring.
Separately, the docstring for flycheck-cuda-extended-lambda included an
overly-long line, which I wrapped.
There's no problem with nesting `let-alist` because per `let-alist`
documentation, dot-references of an embedded let-alist will only refer
to the embedded let-alist and not the outer one.
Fixes:
In flycheck-parse-statix:
flycheck.el:11192:21: Warning: assignment to free variable ‘message’
flycheck.el:11193:21: Warning: assignment to free variable ‘start-line’
flycheck.el:11194:21: Warning: assignment to free variable ‘start-column’
flycheck.el:11195:21: Warning: assignment to free variable ‘end-line’
flycheck.el:11196:21: Warning: assignment to free variable ‘end-column’
flycheck.el:11200:16: Warning: reference to free variable ‘start-line’
flycheck.el:11201:16: Warning: reference to free variable ‘start-column’
flycheck.el:11205:39: Warning: reference to free variable ‘message’
flycheck.el:11213:26: Warning: reference to free variable ‘end-line’
flycheck.el:11214:28: Warning: reference to free variable ‘end-column’
Calling a `__host__ constexpr` function from a `__device__` function
is experimentally allowed by providing this argument to nvcc. This
fixes errors that look like this:
```
include/cuco/detail/static_map.inl(400): error: calling a constexpr __host__ function("is_packable") from a __device__ function("operator()") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
```