Skip to main content

Warns about unattended branches and FIXME or TODO annotations

Project description

check-oldies is a collection of programs that warn about old things in code:

  • check-fixmes warns about old FIXME or TODO annotations and orphan FUTURE tags.

    If we did not regularly check, we would forget about that FIXME note we wrote a few months ago. check-fixmes warns us about it. It is then our choice to act: fix it, remove it (because we decided it is not worth to fix, or because it is not relevant anymore), or postpone it.

    FUTURE tags: We sometimes plan a broad modification that will span multiple files. Instead of littering FIXME annotations everywhere, we set a single FIXME annotation and a FUTURE-xxx tag on the same line. Then, wherever we need to make a modification, we only mention this FUTURE-xxx tag without any FIXME. If we ever remove the FIXME but keep a FUTURE-xxx tag somewhere, it is a mistake and this tool warns us.

  • check-branches warns about old branches, surprisingly.

  • forget-me-not runs both programs above on a set of Git repositories and sends warning e-mails to authors of soon-to-be-old annotations or branches.

In other words: check-fixmes and check-branches can be run as part of the test suite of each project (by a continuous integration system such as Jenkins). They break builds when they detect old things. On the other hand, forget-me-not can be run once a week on a set of projects to warn authors that some builds will break soon if they do not take care of their old annotations or branches.

Example output

$ check-fixmes
NOK: Some annotations are too old, or there are orphan FUTURE tags.
jdoe            -  181 days - frobulator/api.py:12: # FIXME (jdoe): we should catch errors
jdoe            -  100 days - frobulator/api.py:25: # TODO: this is slow, use the batch API instead
jsmith          -   12 days - docs/index.rst:1: # FIXME: write documentation before open sourcing
$ check-branches
NOK: Some branches are too old.
john.smith@example.com     -   92 days - jsmith/fix_frobs (https://github.com/Polyconseil/check-oldies/tree/jsmith/fix_frobs), linked to open PR/MR #1 (https://github.com/Polyconseil/check-oldies/pull/1)

Applicability

check-oldies is written in Python but is language-agnostic. It works on Git repositories but could be extended to other version control systems. It integrates with GitHub but can do without it, and could be extended to work with other code hosting platforms.

Requirements and installation

You must have Python 3.6 or later, and a relatively recent version of Git. Git 2.1.4 (shipped with Debian Jessie) is known to work. More recent versions should work and are supported.

Install with pip, preferably in a virtual environment:

$ python3 -m venv /path/to/your/virtualenv
$ source /path/to/your/virtualenv/bin/activate

$ pip install "check-oldies[toml]"

Features, configuration and more

The full documentation has more details about the features and the configuration, examples of the usage of FUTURE tags, how to contribute, etc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

check-oldies-0.8.3.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

check_oldies-0.8.3-py2.py3-none-any.whl (18.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file check-oldies-0.8.3.tar.gz.

File metadata

  • Download URL: check-oldies-0.8.3.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

File hashes

Hashes for check-oldies-0.8.3.tar.gz
Algorithm Hash digest
SHA256 6987ff3b03e4b7e4b625167efa740dce16843adf477d4522ede21003196063c2
MD5 ca4db5f4a34a3a8f8a1b2ce6812d1944
BLAKE2b-256 c73e9f448d90c05677e10534b03ce6bc02d395daa773a3bcad3ab06f5750f391

See more details on using hashes here.

File details

Details for the file check_oldies-0.8.3-py2.py3-none-any.whl.

File metadata

  • Download URL: check_oldies-0.8.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

File hashes

Hashes for check_oldies-0.8.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 707bef98d8777dc65a8bd617f85f2e7fa71be3634c0a612a8ef6cff038626ee0
MD5 f8b8ca4161c515e3ac1ef02c448026a6
BLAKE2b-256 e25c11a53f517f99ea6cf5c6b3df4213473b3a048c1f25990f3ae856362ace69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page