All Projects → arcrose → Clink

arcrose / Clink

Licence: mit
A developer assistance tool to help with refactoring and keeping related code up to date with changes

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Clink

Mac-OS-Setup-Applications
👾 All I need to setup a new Mac and the applications I use everyday as a Web Developper
Stars: ✭ 96 (+140%)
Mutual labels:  workflow, developer
open-source-DSA-code
open source contribution during hacktoberfest for beginners.
Stars: ✭ 31 (-22.5%)
Mutual labels:  code, developer
Fundamentals Of Python Data Structures
《数据结构(Python语言描述)》"Fundamentals of Python:Data Structures" 电子书和配套代码
Stars: ✭ 30 (-25%)
Mutual labels:  code
Omgf
Use Git Flow with ease – maintain branches, semantic versioning, releases, and changelog with a single command.
Stars: ✭ 37 (-7.5%)
Mutual labels:  workflow
Common Flow
An attempt to gather a sensible selection of the most common usage patterns of git into a single and concise specification.
Stars: ✭ 33 (-17.5%)
Mutual labels:  workflow
Wfl
A Simple Way of Creating Job Workflows in Go running in Processes, Containers, Tasks, Pods, or Jobs
Stars: ✭ 30 (-25%)
Mutual labels:  workflow
Innovative Hacktober
Make a pull request. Let's hack the ocktober in an innovative way.
Stars: ✭ 34 (-15%)
Mutual labels:  developer
Image To Image Papers
🦓<->🦒 🌃<->🌆 A collection of image to image papers with code (constantly updating)
Stars: ✭ 949 (+2272.5%)
Mutual labels:  code
Developer Tools And Resources
The Best Tools and Resources for developers
Stars: ✭ 39 (-2.5%)
Mutual labels:  developer
Web Develop
🌱《大话WEB开发》WEB开发相关经验总结分享
Stars: ✭ 968 (+2320%)
Mutual labels:  developer
Jdonframework
Domain-Driven-Design Pub/Sub Domain-Events framework
Stars: ✭ 978 (+2345%)
Mutual labels:  workflow
Nlppln
NLP pipeline software using common workflow language
Stars: ✭ 31 (-22.5%)
Mutual labels:  workflow
My Favorite Things
Moved to: https://gitlab.com/brennovich/my-favorite-things
Stars: ✭ 30 (-25%)
Mutual labels:  workflow
Jupyterlab black
A JupyterLab extension to apply Black formatter to code within codecell.
Stars: ✭ 35 (-12.5%)
Mutual labels:  code
Wechatdeveloper
【新】微信服务号+微信小程序+微信支付+支付宝支付
Stars: ✭ 953 (+2282.5%)
Mutual labels:  developer
Iso 639 3
ISO 639-3 codes in an accessible format
Stars: ✭ 37 (-7.5%)
Mutual labels:  code
Pinecoders.github.io
PineCoders Web Site
Stars: ✭ 30 (-25%)
Mutual labels:  code
Learningprocess
💥 本仓库用于记录我的学习历程和学习笔记
Stars: ✭ 31 (-22.5%)
Mutual labels:  code
Renew
Mix task to create mix projects that builds into Docker containers.
Stars: ✭ 33 (-17.5%)
Mutual labels:  code
Redaxo Mit Docker
Simple 🐳 Docker setup for REDAXO development. Contains demo website and beginner’s guide!
Stars: ✭ 40 (+0%)
Mutual labels:  workflow

clink

A tool that helps developers keep track of changes that need to be made to files in response to other changes. Clink is agnostic to the programming language(s) used in your project, and allows you to put link directives in the comments of your source code to link to other parts of your codebase.

Using Clink

Tagging code to get reminders

Suppose you are planning on or in the process of doing a code refactoring. Your project may be using more than one programming language, involve documentation, etc. that you'd like to remember to change in response to changes to other parts of your code.

For example, you may have a couple of call sites like the following where you invoke an API client endpoint.

12. ...
13. // [clink tag](get_film_api)
14. let film = api_client.get_film_info(film_id)?;
15. ...

After we've added all of the tags we want to use, which mark places we'll want to receive reminders about, we can tell clink to scan our repository's contents to keep a record of these parts of our code.

clink setup

If there are directories or files you'd like to exclude, you can specify one or more using the -e or --exclude argument.

clink setup -e rust/target -e javascript/node_modules

Because clink is agnostic to the contents of your files, you can use it across programming languages as well.

This command creates a file called .clink in the root of your repository. This file contains a list of mappings tracking tags (such as get_film_api) and the files those tags are referenced in.

Specifying a section to watch for changes

Using the clink open and clink close directives, you can mark a section of code to be watched for changes by clink so that, when you modify the contents of the delimited lines of code, clink can tell you about tags inserted into related code, like in the example in the previous section.

Suppose the following code is where you have your implementation of the API client function used above.

// [clink open](get_film_api, to_refactor)
/// Fetches information about a requested film, given its ID in the API.
pub fn get_film_info(&self, film_id: ID) -> Result<Film, APIError> {
  ...
}
// [clink close]()

With this clink section in place, you can run clink after changing the get_film_info function body or signature but before using git add to stage the changes and clink will let you know about any other parts of the code tagged with either get_film_api or to_refactor.

clink

Building clink

Clink has been developed and tested with Rust 1.16 stable. However it should work fine with any version after and including 1.15 stable. If you don't already have the Rust compiler and cargo installed, you can get it from the official website. Once you've got it set up, you can build clink using the following commands.

# Grab the clink repository
git clone https://github.com/zsck/clink
cd clink
cargo build --release
sudo cp ./target/release/clink /usr/local/bin

You should now be able to get information about how to use clink:

clink help

Contributing

If you have suggestions for how to improve clink, please let me know by creating a Github issue! I'd love to receive help with improvements, and pull requests of any shape or size are very much welcome.

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].