Skip to main content

The project copyright linter

Project description

Project copyright linter

A small utility to maintain the copyright status of a project in the correct state.

Copyright format

  • Python copyright format:
# Copyright (c) 20XX Celadon Development LLC, All rights reserved.
# Author Name Surname <name.surname@celadon.ae>
  • JavaScript copyright format:
// Copyright (c) 20XX Celadon Development LLC, All rights reserved.
// Author Name Surname <name.surname@celadon.ae>

Installation

  • install package via pip toolkit: pip install crtool
  • configure utility use one of two available methods
  • run the project copyright linting: crtool

Configuration

Configuration settings are applied in two ways: by setup.cfg file or .crlintrc file. The setup.cfg file has more high priority. To set an exclusion pattern to ignore some file formats, use a unix pattern written in one of the files you selected.

  • configuration utility in the setup.cfg file must have such format:
[crlint]
patterns=*.json, *.txt
  • configuration utility in the .crlintrc file must have such format:
[ignore]
patterns=*.json, *.txt

Integration with Bitbucket CI:

Add such step in your bitbucket-pipelines.yml file to run checking a project copyright:

pipelines:
  default:
    - step:
        name: Linting copyright
        image: python:3.7.2
        script:
          - pip install crtool
          - crlint

Update pip package

  • Login to the PiPy repository
  • Increase version in the setup file
  • Create a python package dist
  • Update package on the PyPi repository
# Create a package dist.
python setup.py sdist bdist_wheel

# Upload package to repository.
pip install twine
twine upload -u $CT_PYPI_USERNAME -p $CT_PYPI_PASSWORD  dist/*

Development

Setup git hook to linting the project before commit.

chmod a+x pre-commit && cp pre-commit .git/hooks

To run the test and verify the code, follow the commands below:

# To run the project linting.
flake8 crlint tests

# To run the project testing.
python -m coverage run -m unittest discover tests/
python -m coverage report -m

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

crlint-0.1.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

crlint-0.1.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file crlint-0.1.2.tar.gz.

File metadata

  • Download URL: crlint-0.1.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for crlint-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bc610a86ca4438890fe168e541f203d81e4f28986166e799f0aec7d822ebe965
MD5 b7460d5b8bf442d44b8a9cb2155ea669
BLAKE2b-256 7f3ef1a3c53e0d575f06eb3ec50cf4d4fec3fb92c4eff24b6a4f330bda726ae4

See more details on using hashes here.

File details

Details for the file crlint-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: crlint-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for crlint-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4005bfdae10bb2763c897b3a7d99bc0bf119c95161cfb5587cda5249daf4ccf7
MD5 cac87a44911120a9c49927d31555b55c
BLAKE2b-256 4f8c1b71abfec9e301e5b597a3c740672abbf87f0bfa6126c62fc0cf0f15270c

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