All Projects β†’ somewhatabstract β†’ checksync

somewhatabstract / checksync

Licence: MIT license
A tool for detecting when related text blocks change

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to checksync

flake8-broken-line
🚨 Flake8 plugin to forbid backslashes (\) for line breaks
Stars: ✭ 85 (+507.14%)
Mutual labels:  linting, code-quality
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (+514.29%)
Mutual labels:  linting, code-quality
editorconfig-checker.javascript
A tool to verify that your files are in harmony with your .editorconfig
Stars: ✭ 59 (+321.43%)
Mutual labels:  linting, code-quality
Dotenv Linter
☺️ Linting dotenv files like a charm!
Stars: ✭ 207 (+1378.57%)
Mutual labels:  linting, code-quality
App Githooks
Plugin-based system to run specific actions and checks when git hooks are triggered.
Stars: ✭ 5 (-64.29%)
Mutual labels:  linting, code-quality
Eslint Plugin Import
ESLint plugin with rules that help validate proper imports.
Stars: ✭ 3,722 (+26485.71%)
Mutual labels:  linting, code-quality
eslint-plugin-import
ESLint plugin with rules that help validate proper imports.
Stars: ✭ 4,290 (+30542.86%)
Mutual labels:  linting, code-quality
Swiftlint
Stars: ✭ 15,500 (+110614.29%)
Mutual labels:  linting, code-quality
Editorconfig Checker
A tool to verify that your files are in harmony with your .editorconfig
Stars: ✭ 119 (+750%)
Mutual labels:  linting, code-quality
Flakehell
Flake8 wrapper to make it nice, legacy-friendly, configurable.
Stars: ✭ 217 (+1450%)
Mutual labels:  linting, code-quality
Golite
Add essential language support for the Go language to Sublime Text 3.
Stars: ✭ 14 (+0%)
Mutual labels:  linting
Coherence
Blender viewport renderer using the Unity Engine
Stars: ✭ 28 (+100%)
Mutual labels:  synchronization
locize-cli
locize cli to import / export locales, add / edit / remove sync segments
Stars: ✭ 44 (+214.29%)
Mutual labels:  synchronization
li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (+107.14%)
Mutual labels:  linting
docker-go-dev
The containerized Go development environment.
Stars: ✭ 93 (+564.29%)
Mutual labels:  linting
BoilR
Synchronize games from other platforms into your Steam library
Stars: ✭ 664 (+4642.86%)
Mutual labels:  synchronization
SAVY
SAVY Player provides service to watch local videos with in a synchronized way.
Stars: ✭ 15 (+7.14%)
Mutual labels:  synchronization
sonar-groovy
SonarQube plugin for Groovy
Stars: ✭ 42 (+200%)
Mutual labels:  code-quality
braid-spec
Working area for Braid extensions to HTTP
Stars: ✭ 179 (+1178.57%)
Mutual labels:  synchronization
stylelint-config-xo
Stylelint shareable config for XO
Stars: ✭ 34 (+142.86%)
Mutual labels:  linting

checksync

Node CI codecov npm (tag) Required Node Version

Installation

Install using your preferred package manager.

yarn add --dev checksync
npm install --save-dev checksync

After installation, try running checksync with the --help argument to see more information:

yarn checksync --help
npx checksync --help

Usage

For detailed usage information, run yarn checksync --help.

Example workflow

  1. Add synchronization tags to files indicating what sections to synchronize and with which files:

    // my-javascriptfile.js
    // sync-start:mysyncid ./my-pythonfile.py
    /**
     * Some code that needs to be synchronised.
     */
    // sync-end:mysyncid
    # my-pythonfile.py
    # sync-start:mysyncid ./my-javascriptfile.js
    '''
    Some code that needs to be synchronised.
    '''
    # sync-end:mysyncid

    Use consecutive sync-start tags with the same identifier to target multiple files.

    // my-csharpfile.cs
    // sync-start:mysyncid ./my-pythonfile.py
    // sync-start:mysyncid ./my-javascriptfile.js
    /**
     * Some code that needs to be synchronised.
     */
    // sync-end:mysyncid
  2. Run checksync to verify the tags are correct:

    yarn checksync <globs|files|dirs>
  3. Run with --update-tags or -u to automatically insert the missing checksums:

    yarn checksync -u <globs|files|dirs>
  4. Add a pre-commit step to run checksync on commiting changes so that you catch when synchronized blocks change. You can do this using a package like husky, or pre-commit.

  5. Commit your tagged files!

To get more information about the various arguments that checksync supports as well as information about sync-tags, run yarn checksync --help.

Target file paths

All target paths are relative to your project root directory. By default, this is determined, using ancesdir to be the ancestor directory of the files being processed that contains package.json. If you want to specify a different root (for example, if you're syncing across multiple packages in a monorepo) you can specify a custom marker name using the --root-marker argument.

Contributing

For details on contributing to checksync, checkout our contribution guidelines.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].