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?
已存档?
是复刻?
已锁定?
是镜像?
是私有?