Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Arti Arti
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 137
    • Issues 137
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • ArtiArti
  • Merge requests
  • !123

In rust-nightly CI, forbid debugging prints.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Nick Mathewson requested to merge nickm/arti:ci-no-printf into main Nov 04, 2021
  • Overview 1
  • Commits 1
  • Pipelines 1
  • Changes 2

This patch makes the rust-nightly CI task fail if it detects any dbg!(), println!(), or eprintln!() calls in production code.

Because of clippy limitations, it may also gripe about calls to these macros in our tests. The preferred workarounds are to either instead. Both are acceptable.

We're doing this check in CI rather than unconditionally with clippy directives, since we often want to have these calls in our code temporarily while we're developing. Some day we might want this test to go into a pre-push hook.

This patch also adds #![allow()] directives for println!() and eprintln!() in the arti crate. Since that one isn't a library, it's okay for it to speak to stdout/stderr.

Closes #218 (closed).

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: ci-no-printf