codelingo

CodeLingo // Continuous Higher Standards

Github星跟蹤圖

Overview

CodeLingo finds and fixes issues in existing code and ensures the same issues don't sneak in with new pull requests. CodeLingo also generates your contributor docs thus automating three cornerstones (bug fixing, reviewing and doc updates) to scale up your code quality.

@CodeLingoBot Quick Start

@CodeLingoBot fixes bugs, automates code reviews and updates contributor docs for repos on GitHub based on rules, called Tenets, defined in codelingo.yaml files. There are several ways you can interact with @CodeLingoBot. The simplest is to trigger actions by commenting on a Pull Request:

  • @CodeLingoBot review reviews the PR based on default Tenets for the repo's language or custom Tenets added in a codelingo.yaml file in the root of the repo. You can trigger CodeLingo actions by replying to comments generated by@review

    • @CodeLingoBot review ignore [reason] ignores the issue for current and future reviews with an optional reason why.
    • @CodeLingoBot review un-ignore un-ignores the issue for current and future reviews.
  • @CodeLingoBot rewrite makes a PR to this PR fixing the issues found based on default Tenets for the repo's language or custom Tenets added in a codelingo.yaml file in the root of the repo. You can trigger CodeLingo actions by replying to comments generated by@rewrite

    • @CodeLingoBot rewrite set <varname> sets the value of a variable in a rewrite template.

To have @CodeLingoBot automatically review every new Pull Request to your repo, install CodeLingo on your repo. If you don't already have a codelingo.yaml file, @CodeLingoBot will make a PR to add one to your repo. This will contain a bundle of Tenets based on the languages in your repo.

Every pull request to your repository will now be checked against the go Tenet bundle we imported above:

Editing codelingo.yaml

Let @CodeLingoBot know what Tenets you'd like it to enforce by adding or removing them from codelingo.yaml. You can find Tenets to add here: https://www.codelingo.io/tenets. For example, if we wanted to install the "go" bundle written by "codelingo" we'd update the codelingo.yaml as follows:

# codelingo.yaml file

tenets:
  - import: codelingo/go

Power Users!

The rest of this README is for users interested in writing their own Tenets and testing out CodeLingo on repositories on their local machine.

Contributing a Tenet or Tenet Bundle

The Tenet bundles that are rendered on codelingo.io/tenets are populated by the Tenets in the tenets directory in this repository. Contributing a new Tenet is simply a matter of making a PR to this repo. We're a young community of Tenet authors eager to help and guide you through your first PR.

Get started with the docs and find us at codelingo.slack.com!

Writing a Tenet

Playground

Each Tenet has a query, written in CLQL, to match a pattern. The online playground is a quick way to test and learn CLQL. It has a box of source code next to a box of CLQL. Select the source code and the playground will automatically generate the CLQL to match that selection!

Setting up CodeLingo on your Dev Box

Before we get into writing Tenets, we want to ensure we can run and test them locally. For this, we're going to use the lingo CLI tool to run a review on our local machine. First, install the lingo CLI and set it up with the following commands:

# Run this command from anywhere. Follow the prompts to set up Codelingo on your machine.
$ lingo config setup

# Run this command inside a git repository to add a default codelingo.yaml file in the current directory.
$ lingo init

Replace the content of the codelingo.yaml file we wrote above with:

  tenets:
    - import: codelingo/go

You can now run the review to check your source code against the go Tenet bundle we imported above.

# Run this command from the same directory as the codelingo.yaml file or any of its sub directories.
$ lingo run review

Next Steps

You now have the tools setup to start writing your own Tenets! See the getting started guide to learn more about Tenets and how to write them.

Resources

Community

Learn

Repos

About Us

We are a small VC backed development team from ? New Zealand with a passion for the art of software development in itself!

Check out our team here: codelingo.io/about.

主要指標

概覽
名稱與所有者codelingo/codelingo
主編程語言
編程語言Go (語言數: 0)
平台
許可證Apache License 2.0
所有者活动
創建於2015-09-23 10:12:09
推送於2023-03-20 01:16:00
最后一次提交2023-03-20 09:16:00
發布數1
最新版本名稱v0.1.0-alpha (發布於 )
第一版名稱v0.1.0-alpha (發布於 )
用户参与
星數174
關注者數10
派生數36
提交數1.1k
已啟用問題?
問題數91
打開的問題數0
拉請求數378
打開的拉請求數0
關閉的拉請求數51
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?