Skip to content

[Linting Rule] Stop Call

github-actions[bot] edited this page Jun 13, 2026 · 1 revision

This document was generated from 'src/documentation/wiki-linter.ts' on 2026-06-01, 20:20:18 UTC presenting an overview of flowR's linter (v2.10.6). Please do not edit this file/wiki page directly.

Stop without call.=False argument [overview]

smell

This rule is a best-effort rule.

Checks whether stop calls without call. argument set to FALSE are used.
This linting rule is implemented in src/linter/rules/stop-with-call-arg.ts.

Configuration

Linting rules can be configured by passing a configuration object to the linter query as shown in the example below. The stop-call rule accepts the following configuration options:

Examples

stop(42)

The linting query can be used to run this rule on the above example:

[ { "type": "linter",   "rules": [ { "name": "stop-call",     "config": {} } ] } ]

Results (prettified and summarized):

Query: linter (1 ms)
   ╰ Stop without call.=False argument (stop-call):
       ╰ uncertain:
           ╰ Code at 1.1-8
       ╰ Metadata: consideredNodes: 0, searchTimeMs: 0, processTimeMs: 1
All queries together required ≈1 ms (1ms accuracy, total 1 ms)

Show Detailed Results as Json

The analysis required 0.6 ms (including parsing and normalization and the query) within the generation environment.

In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR. Please consult the Interface wiki page for more information on how to get those.

{
  "linter": {
    "results": {
      "stop-call": {
        "results": [
          {
            "certainty": "uncertain",
            "involvedId": 3,
            "loc": [
              1,
              1,
              1,
              8
            ]
          }
        ],
        ".meta": {
          "consideredNodes": 0,
          "searchTimeMs": 0,
          "processTimeMs": 1
        }
      }
    },
    ".meta": {
      "timing": 1
    }
  },
  ".meta": {
    "timing": 1
  }
}

Additional Examples

These examples are synthesized from the test cases in: test/functionality/linter/lint-stop-call.test.ts

Test Case: none

Given the following input:

x <- 1

We expect the linter to report the following:

* no lints

See here for the test-case implementation.

Test Case: single stop

Given the following input:

stop(x)

We expect the linter to report the following:

				certainty: LintingResultCertainty.Uncertain,
loc:       SourceRange.from(1, 1, 1, 7)

See here for the test-case implementation.

Test Case: single stop with arg

Given the following input:

stop(x, call.=FALSE)

We expect the linter to report the following:

* no lints

See here for the test-case implementation.

Test Case: shadow call.

Given the following input:

stop <- function(x, call.){return 0}
stop(3, call.=TRUE)

We expect the linter to report the following:

* no lints

See here for the test-case implementation.

Test Case: stop with set to true

Given the following input:

stop(y, call.=TRUE)

We expect the linter to report the following:

				certainty: LintingResultCertainty.Uncertain,
loc:       SourceRange.from(1, 1, 1, 19)

See here for the test-case implementation.

Test Case: resolve flag in stop

Given the following input:

x <- FALSE
stop(y, call.=x)

We expect the linter to report the following:

* no lints

See here for the test-case implementation.

Clone this wiki locally