Skip to content

[Fix] Resolve CodeFactor lint findings#171

Merged
antoniojbt merged 1 commit into
episcout2from
codex/suggest-fixes-for-codecov-test-failures
Jun 18, 2026
Merged

[Fix] Resolve CodeFactor lint findings#171
antoniojbt merged 1 commit into
episcout2from
codex/suggest-fixes-for-codecov-test-failures

Conversation

@antoniojbt

Copy link
Copy Markdown
Owner

Motivation

  • A CodeFactor/lintr run on the PR reported multiple lint issues (indentation, object name length/style and mis-parsed shell wrapper) which caused the check to fail.
  • The intent is to fix lint violations without breaking public APIs or changing runtime behaviour of exported functions.

Description

  • Fixed indentation and formatting issues in test files under tests/testthat/ to satisfy the configured 2-space/hanging-indent rules.
  • Updated R/epi_stats_numeric.R to use an internal snake_case variable n_non_na while preserving the public output column name n_nonNA with a targeted # nolint: object_name_linter suppression.
  • Shortened private/helper names used only in tests (e.g. expected_project_template_entries -> template_entries, expect_project_template_entries -> expect_template_entries) to address object_length_linter warnings.
  • Excluded the bash R wrapper scripts/rscript_env_caller.R from R linters by adding it to .lintr exclusions, and added a couple of # nolint annotations in R/eda_synthetic.R to silence deliberate style exceptions.

Testing

  • Inspected the CodeFactor annotations via the GitHub API and reproduced the lint list; used that output to target fixes.
  • Ran bash -n scripts/rscript_env_caller.R to validate shell syntax which succeeded.
  • Ran git diff --check to ensure no whitespace/merge conflict markers remain which succeeded.
  • Attempted to run scripts/rscript_env_caller.R -e "lintr::lint_package()" but it could not complete because the repo-configured Rscript binary (/root/apps/miniforge3/envs/episcout/bin/Rscript) is not available in this environment; lintr checks are the reason for the changes and should pass in CI where the R environment exists.

Codex Task

@antoniojbt
antoniojbt merged commit 3cc9b93 into episcout2 Jun 18, 2026
2 checks passed
@antoniojbt
antoniojbt deleted the codex/suggest-fixes-for-codecov-test-failures branch June 18, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant