{"id":13824870,"url":"https://github.com/src-d/lookout","last_synced_at":"2025-05-05T05:05:33.011Z","repository":{"id":48272998,"uuid":"136146572","full_name":"src-d/lookout","owner":"src-d","description":"Assisted code review, running custom code analyzers on pull requests","archived":false,"fork":false,"pushed_at":"2021-08-03T19:18:36.000Z","size":60130,"stargazers_count":150,"open_issues_count":84,"forks_count":36,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-05T05:05:24.219Z","etag":null,"topics":["code-review","github","lookout"],"latest_commit_sha":null,"homepage":"https://docs.sourced.tech/lookout","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/src-d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-05T08:37:23.000Z","updated_at":"2025-02-03T00:40:44.000Z","dependencies_parsed_at":"2022-09-03T15:12:41.708Z","dependency_job_id":null,"html_url":"https://github.com/src-d/lookout","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Flookout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Flookout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Flookout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/src-d%2Flookout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/src-d","download_url":"https://codeload.github.com/src-d/lookout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252442485,"owners_count":21748451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-review","github","lookout"],"created_at":"2024-08-04T09:01:10.841Z","updated_at":"2025-05-05T05:05:33.004Z","avatar_url":"https://github.com/src-d.png","language":"Go","readme":"\u003ca href=\"https://www.sourced.tech/lookout\"\u003e\n  \u003cimg src=\"./docs/assets/sourced-lookout.png\" alt=\"source{d} Lookout\" height=\"120px\"\u003e\n\u003c/a\u003e\n\n**Service for assisted code review, that allows running custom code Analyzers on pull requests.**\n\n[![GitHub version](https://badge.fury.io/gh/src-d%2Flookout.svg)](https://github.com/src-d/lookout/releases)\n[![Build Status](https://travis-ci.com/src-d/lookout.svg?branch=master)](https://travis-ci.com/src-d/lookout)\n![Development](https://svg-badge.appspot.com/badge/stability/development?color=D6604A)\n[![Code Coverage](https://codecov.io/github/src-d/lookout/coverage.svg)](https://codecov.io/github/src-d/lookout)\n[![Go Report Card](https://goreportcard.com/badge/github.com/src-d/lookout)](https://goreportcard.com/report/github.com/src-d/lookout)\n[![GoDoc](https://godoc.org/github.com/src-d/lookout?status.svg)](https://godoc.org/github.com/src-d/lookout)\n\n[Website](https://www.sourced.tech) •\n[Documentation](https://docs.sourced.tech) •\n[Blog](https://blog.sourced.tech) •\n[Slack](http://bit.ly/src-d-community) •\n[Twitter](https://twitter.com/sourcedtech)\n\n## Introduction\n\nWith **source{d} Lookout**, we’re introducing a service for assisted code review, that allows running custom code analyzers on pull requests.\n\nJump to the [Quickstart](#quickstart) section to start using it!\n\n\n**Table of Contents**\n\n\u003c!--ts--\u003e\n* [Introduction](#introduction)\n  * [Motivation and Scope](#motivation-and-scope)\n  * [Current Status](#current-status)\n  * [Further Reading](#further-reading)\n* [Quickstart](#quickstart)\n* [Available Analyzers](#available-analyzers)\n* [Create an Analyzer](#create-an-analyzer)\n* [Contribute](#contribute)\n  * [Community](#community)\n* [Code of Conduct](#code-of-conduct)\n* [License](#license)\n\u003c!--te--\u003e\n\n\n### Motivation and Scope\n\nsource{d} is the company driving the Machine Learning on Code (#MLonCode) movement. Doing Machine Learning on Code consists of applying ML techniques to train models that can cluster, identify and predict useful aspects of source code and software repositories.\n\n**source{d} Lookout** is the first step towards a full suite of Machine Learning on Code applications for AI-assisted coding, but you can also create your own analyzers without an ML approach.\n\nThe benefits of using **source{d} Lookout** are:\n- Keep your code base style/patterns consistent.\n- Language agnostic assisted code reviews.\n- Identify where to focus your attention on code reviews.\n- Automatically warn about common mistakes before human code review.\n\n### Current Status\n\nCurrently, **source{d} Lookout** is in development process.\n\n### Further Reading\n\nThis repository contains the code of **source{d} Lookout** and the project documentation, which you can also see properly rendered at [https://docs.sourced.tech/lookout](https://docs.sourced.tech/lookout).\n\n\n## Quickstart\n\n_There are several ways to run **source{d} Lookout**; we recommend to use `docker-compose` because it's straightforward, but you can [learn more about the **different ways to run source{d} Lookout**](/docs/how-to-run.md)._\n\n_Please refer to the [**Configuring source{d} Lookout** guide](/docs/configuration.md) for documentation about the `config.yml` file, and to know how to configure **source{d} Lookout** to analyze your repositories, or to use your own analyzers._\n\nThere is [`docker-compose.yml`](/docker-compose.yml) config file for [Docker Compose](https://docs.docker.com/compose) to start **source{d} Lookout**, its dependencies (**bblfsh** and **PostgreSQL**) and a [`dummy` analyzer](analyzers-examples.md#dummy-analyzer) which will add some stats to the watched pull requests.\n\nTo do so, clone this repository or download [`docker-compose.yml`](/docker-compose.yml) directly.\n\nCreate the `config.yml` file in the same directory where `docker-compose.yml` is. You can use [`config.yml.tpl`](/config.yml.tpl) as a template. Make sure that you specify in the `config.yml` the repositories that will be watched by **source{d} Lookout**. Then run, passing [a valid GitHub user/token](docs/configuration.md#authentication-with-github):\n\n```bash\n$ docker-compose pull\n$ GITHUB_USER=\u003cuser\u003e GITHUB_TOKEN=\u003ctoken\u003e docker-compose up --force-recreate\n```\n\nOnce it is running, **source{d} Lookout** will start posting the comments returned by `dummy` analyzer into the pull requests opened at GitHub in the repositories that you configured to be watched.\n\nYou can stop it by pressing `ctrl+c`\n\nIf you want to try **source{d} Lookout** with your own analyzer instead of `dummy` one, you must run it in advance, then [set it into `config.yml`](/docs/configuration.md#analyzers) and then run:\n\n```bash\n$ docker-compose pull\n$ GITHUB_USER=\u003cuser\u003e GITHUB_TOKEN=\u003ctoken\u003e docker-compose up --force-recreate lookout bblfsh postgres\n```\n\nIf you need to reset the database to a clean state, you should drop the `postgres` container. To do so, stop running **source{d} Lookout** with `ctrl+c` and then execute:\n\n```bash\n$ docker rm lookout_postgres_1\n```\n\n\n## Available Analyzers\n\nThis is the list of the known implemented analyzers for **source{d} Lookout**:\n\n| Name | Description | Targeted files | Maturity level |\n| --- | --- | --- | --- |\n| [style-analyzer](https://github.com/src-d/style-analyzer) | Code style analyzer |  | development |\n| [terraform](https://github.com/src-d/lookout-terraform-analyzer) | Checks if [Terraform](https://github.com/hashicorp/terraform/) files are correctly formatted | Terraform | usable |\n| [gometalint](https://github.com/src-d/lookout-gometalint-analyzer) | Reports [gometalinter](https://github.com/alecthomas/gometalinter) results on pull requests | Go | testing and demo |\n| [sonarcheck](https://github.com/src-d/lookout-sonarcheck-analyzer) | Reports [SonarSource](https://github.com/bblfsh/sonar-checks) checks results on pull requests using [bblfsh UAST](https://doc.bblf.sh/uast/uast-specification.html) | Java | testing and demo |\n| [flake8](https://github.com/src-d/lookout-flake8-analyzer) | Reports [flake8](http://flake8.pycqa.org/en/latest/) results on pull requests | Python| testing and demo |\n| [npm-audit](https://github.com/erizocosmico/npm-audit-analyzer) | Reports issues with newly added dependencies using [npm-audit](https://docs.npmjs.com/cli/audit) | JavaScript | development |\n| [function-name analyzer](https://github.com/src-d/function-name-analyzer) | Applies a translation model from function identifiers to function names. |  | development |\n\n\n## Create an Analyzer\n\nIf you are developing an Analyzer, or you want more info about how they work, please check the [documentation about **source{d} Lookout** analyzers](/docs/analyzers.md).\n\n\n## Contribute\n\n[Contributions](https://github.com/src-d/lookout/issues) are more than welcome, if you are interested please take a look at our [Contributing Guidelines](/docs/CONTRIBUTING.md).\n\n### Community\n\nsource{d} has an amazing community of developers and contributors who are interested in Code As Data and/or Machine Learning on Code. Please join us! 👋\n\n- [Slack](http://bit.ly/src-d-community)\n- [Twitter](https://twitter.com/sourcedtech)\n- [Email](mailto:hello@sourced.tech)\n\n\n## Code of Conduct\n\nAll activities under source{d} projects are governed by the\n[source{d} code of conduct](https://github.com/src-d/guide/blob/master/.github/CODE_OF_CONDUCT.md).\n\n\n## License\n\nAffero GPL v3.0 or later, see [LICENSE](LICENSE.md).\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrc-d%2Flookout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrc-d%2Flookout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrc-d%2Flookout/lists"}