{"id":13902289,"url":"https://github.com/swvl/linta","last_synced_at":"2025-04-14T21:07:25.841Z","repository":{"id":62049474,"uuid":"553405844","full_name":"swvl/linta","owner":"swvl","description":"A set of useful lint checks to keep the Android app follow a solid design system","archived":false,"fork":false,"pushed_at":"2023-03-27T12:02:03.000Z","size":162,"stargazers_count":48,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-14T21:07:13.691Z","etag":null,"topics":["android","design-system","lint"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swvl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-10-18T06:59:16.000Z","updated_at":"2024-07-20T14:43:04.000Z","dependencies_parsed_at":"2024-01-16T23:46:13.628Z","dependency_job_id":"3a7db6f9-4deb-42b5-9153-383957e2b539","html_url":"https://github.com/swvl/linta","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swvl%2Flinta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swvl%2Flinta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swvl%2Flinta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swvl%2Flinta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swvl","download_url":"https://codeload.github.com/swvl/linta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961238,"owners_count":21189993,"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":["android","design-system","lint"],"created_at":"2024-08-06T22:01:05.101Z","updated_at":"2025-04-14T21:07:25.811Z","avatar_url":"https://github.com/swvl.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# Linta\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.swvl.lint/linta-android.svg)](https://mvnrepository.com/artifact/com.swvl.lint/linta-android)\n[![Build Status](https://app.bitrise.io/app/88ca7b673ed9bb00/status.svg?token=OqjTeLBPuw0W-T1jD9ADNw\u0026branch=main)](https://app.bitrise.io/app/88ca7b673ed9bb00)\n[![Codecov](https://codecov.io/github/swvl/linta/branch/main/graph/badge.svg?token=H8Y422Q1I0)](https://codecov.io/github/swvl/linta)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nA set of useful lint checks developed with Android Lint API to keep the app follow a solid design system\n\n## Motivation\n\nLarge-scale mobile apps often involve large teams of developers. Without proper lint checks in a large project's codebase, one might fall into the pitfall of inconsistent UI designs with different colors being used in layouts and other resources, making the app theme hard to maintain.\n\nFor more details, check [Lint Checks for a Solid Design System](https://docs.google.com/presentation/d/1aDEtm2UE2OoRO59Pt8fb4S43iM79BFncj0pR57WVEvw) session presented at Droidcon Egypt 2022.\n\n## Usage\n\nTo use Linta in your project, add the following line to `build.gradle` file.\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.swvl.lint/linta-android.svg)](https://mvnrepository.com/artifact/com.swvl.lint/linta-android)\n\n```groovy\nlintChecks \"com.swvl.lint:linta-android:x.y.z\"\n```\n\n## Documentation\n\nThe following are the lint checks currently implemented by Linta [please add the documentation to any recent addition and/or any missing ones]:\n\n| Lint Issue ID           |    Severity   | Description                                                                                                                                                                                    |\n|:-----------------------:|:-------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `DuplicateColors`       |    warning    | When a duplicate color is defined in a resource file                                                                                                                                           |\n| `DuplicateResourceFiles`|    warning    | When there are two or more duplicate resource files containing the same exact attributes, regardless of differences in whitespaces, attributes order, comments, or used tools namespace if any |\n| `HardcodedColorSrcCode` |     error     | When a hardcoded color is used in a source code file (Java or Kotlin)                                                                                                                          |\n| `HardcodedColorXml`     |     error     | When a hardcoded color is used in a resource file (drawables, layouts, etc.)                                                                                                                   |\n| `RedundantStyles`       |    warning    | When a style is created without adding any new attributes                                                                                                                                      |\n\nTo see how these checks work in action, check the [generated lint report](https://github.com/swvl/linta/tree/main/sample/build/reports/lint-results-release.html) in our [sample app](https://github.com/swvl/linta/tree/main/sample).\n\n## License\n\n```\nCopyright 2022 Swvl\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswvl%2Flinta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswvl%2Flinta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswvl%2Flinta/lists"}