{"id":13437540,"url":"https://github.com/dotenv-linter/dotenv-linter","last_synced_at":"2025-04-23T20:59:06.852Z","repository":{"id":36957071,"uuid":"225030271","full_name":"dotenv-linter/dotenv-linter","owner":"dotenv-linter","description":"⚡️Lightning-fast linter for .env files. Written in Rust 🦀","archived":false,"fork":false,"pushed_at":"2025-04-21T09:17:28.000Z","size":1305,"stargazers_count":1904,"open_issues_count":29,"forks_count":154,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-23T20:58:56.438Z","etag":null,"topics":["check","compare","contributor-friendly","contributors-welcome","dotenv","dotenv-linter","env","fix","hacktoberfest","linter","rust","rust-lang"],"latest_commit_sha":null,"homepage":"https://dotenv-linter.github.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotenv-linter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"dotenv-linter","open_collective":"dotenv-linter"}},"created_at":"2019-11-30T15:15:55.000Z","updated_at":"2025-04-22T20:16:32.000Z","dependencies_parsed_at":"2023-11-07T17:06:38.465Z","dependency_job_id":"98f58712-369a-4aaf-b261-62ceb5eb957d","html_url":"https://github.com/dotenv-linter/dotenv-linter","commit_stats":{"total_commits":449,"total_committers":91,"mean_commits":4.934065934065934,"dds":0.6080178173719377,"last_synced_commit":"a660edc3c6b88289230bc9eca9f4082d8eac8cdf"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotenv-linter%2Fdotenv-linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotenv-linter%2Fdotenv-linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotenv-linter%2Fdotenv-linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotenv-linter%2Fdotenv-linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotenv-linter","download_url":"https://codeload.github.com/dotenv-linter/dotenv-linter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514767,"owners_count":21443208,"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":["check","compare","contributor-friendly","contributors-welcome","dotenv","dotenv-linter","env","fix","hacktoberfest","linter","rust","rust-lang"],"created_at":"2024-07-31T03:00:58.132Z","updated_at":"2025-04-23T20:59:06.832Z","avatar_url":"https://github.com/dotenv-linter.png","language":"Rust","funding_links":["https://github.com/sponsors/dotenv-linter","https://opencollective.com/dotenv-linter"],"categories":["Development tools","Rust","Supported Linters","开发工具 Development tools","Linters","HarmonyOS"],"sub_categories":["Web Servers","Web服务器 Web Servers","Env","Workflow Automation","Windows Manager","Misc"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/dotenv-linter/dotenv-linter\"\u003e\n    \u003cimg alt=\"dotenv-linter\"\n         width=\"350\" height=\"192\"\n         src=\"https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/logo.svg?sanitize=true\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003e\n⚡️Lightning-fast linter for \u003ccode\u003e.env\u003c/code\u003e files. Written in Rust 🦀\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/dotenv-linter/dotenv-linter/actions\"\u003e\n    \u003cimg alt=\"GitHub Actions\" src=\"https://github.com/dotenv-linter/dotenv-linter/workflows/CI/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/dotenv-linter/dotenv-linter\"\u003e\n    \u003cimg alt=\"Coverage Status\" src=\"https://codecov.io/gh/dotenv-linter/dotenv-linter/branch/master/graph/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/dotenv-linter/dotenv-linter/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/dotenv-linter/dotenv-linter\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/dotenv-linter/dotenv-linter/releases\"\u003e\n    \u003cimg alt=\"Releases\" src=\"https://img.shields.io/github/release/dotenv-linter/dotenv-linter\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n`dotenv-linter` can **[check](#-check)** / **[fix](#-fix)** / **[compare](#-compare)** `.env` files for problems that may cause the application to malfunction.\n\n**Available checks**:\n\n\u003cp\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/duplicated_key\"\u003eDuplicated key\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/ending_blank_line\"\u003eEnding blank line\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/extra_blank_line\"\u003eExtra blank line\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/incorrect_delimiter\"\u003eIncorrect delimiter\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/key_without_value\"\u003eKey without value\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/leading_character\"\u003eLeading character\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/lowercase_key\"\u003eLowercase key\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/quote_character\"\u003eQuote character\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/space_character\"\u003eSpace character\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/substitution_key\"\u003eSubstitution key\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/trailing_whitespace\"\u003eTrailing whitespace\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/unordered_key\"\u003eUnordered key\u003c/a\u003e\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;✅\u0026nbsp;\u003ca href=\"https://dotenv-linter.github.io/#/checks/value_without_quotes\"\u003eValue without quotes\u003c/a\u003e\u003cbr /\u003e\n\u003c/p\u003e\n\n**What is a `.env` file?**\n\n\u003cp\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;💡\u0026nbsp;A \u003ccode\u003e.env\u003c/code\u003e file or \u003ccode\u003edotenv\u003c/code\u003e file is a simple text file containing all the environment variables of a project.\u003cbr /\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;Storing \u003ca href=\"https://12factor.net/config\"\u003econfiguration in the environment variables\u003c/a\u003e is one of the tenets of the \u003ca href=\"https://12factor.net\"\u003eManifesto of Twelve-Factor App\u003c/a\u003e.\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;The \u003ccode\u003e.env\u003c/code\u003e file has a simple key-value format, for example: \u003ccode\u003eFOO=BAR\u003c/code\u003e.\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;More information you can find in articles in \u003ca href=\"https://evrone.com/dotenv-linter?utm_source=github\u0026utm_campaign=dotenv-linter\"\u003eEnglish\u003c/a\u003e and \u003ca href=\"https://www.mgrachev.com/2020/04/20/dotenv-linter\"\u003eRussian\u003c/a\u003e.\n\u003c/p\u003e\n\n**The key features**:\n\n\u003cp\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;⚡️\u0026nbsp;Lightning-fast because it is written in Rust 🦀\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;💣\u0026nbsp;Can be used on any project regardless of the programming language 💥\u003cbr /\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;🚀\u0026nbsp;Can be integrated with \u003ca href=\"https://github.com/reviewdog/reviewdog\"\u003ereviewdog\u003c/a\u003e and other CI services (including \u003ca href=\"https://github.com/dotenv-linter/action-dotenv-linter\"\u003eGitHub Actions\u003c/a\u003e and \u003ca href=\"https://github.com/github/super-linter\"\u003eSuper-Linter\u003c/a\u003e) 🔥\n\u003c/p\u003e\n\n**Articles about dotenv-linter**:\n\n- [EN] [Dotenv-linter: looking after the environment for you](https://evrone.com/dotenv-linter)\n- [EN] [What's new in dotenv-linter v2.2.0?](https://evrone.com/dotenv-linter-v220)\n- [EN] [What are the key changes in dotenv-linter v3.0.0 release?](https://evrone.com/dotenv-linter-v300)\n- [RU] [Dotenv-linter: линтер .env файлов](https://www.mgrachev.com/2020/04/20/dotenv-linter)\n- [RU] [Что нового в dotenv-linter v2.2.1?](https://evrone.ru/dotenv-linter-v220)\n- [RU] [Что нового в dotenv-linter v3.0.0?](https://evrone.ru/dotenv-linter-v300)\n\n## 👨‍💻 Installation\n\n### Pre-compiled binary\n\n```shell script\n# Linux / macOS / Windows (MINGW and etc). Installs it into ./bin/ by default\n$ curl -sSfL https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s\n\n# Or a shorter way\n$ curl -sSfL https://git.io/JLbXn | sh -s\n\n# Specify installation directory and version\n$ curl -sSfL https://git.io/JLbXn | sh -s -- -b usr/local/bin v2.0.0\n\n# Alpine Linux (using wget)\n$ wget -q -O - https://git.io/JLbXn | sh -s\n```\n\nYou can find other installation methods here: https://dotenv-linter.github.io/#/installation\n\n## 🚀 Usage\n\n#### ✅ Check\n\nBy default, `dotenv-linter` checks all `.env` files in the current directory:\n\n```shell\n$ dotenv-linter\nChecking .env\n.env:2 DuplicatedKey: The FOO key is duplicated\n.env:3 UnorderedKey: The BAR key should go before the FOO key\n\nChecking .env.test\n.env.test:1 LeadingCharacter: Invalid leading character detected\n\nFound 3 problems\n```\n\n#### 🛠 Fix\n\nIt can also fix the found warnings with the `fix` command:\n\n```shell\n$ dotenv-linter fix\nFixing .env\nOriginal file was backed up to: \".env_1601378896\"\n\n.env:2 DuplicatedKey: The BAR key is duplicated\n.env:3 LowercaseKey: The foo key should be in uppercase\n\nAll warnings are fixed. Total: 2\n```\n\n#### 🤲 Compare\n\nIn addition, `dotenv-linter` can compare `.env` files with each other and output the difference between them:\n\n```shell\n$ dotenv-linter compare .env .env.example\nComparing .env\nComparing .env.example\n.env is missing keys: BAR\n.env.example is missing keys: FOO\n```\n\nOther use cases you can find on the documentation site (https://dotenv-linter.github.io):\n\n- [Check](https://dotenv-linter.github.io/#/usage/check)\n- [Fix](https://dotenv-linter.github.io/#/usage/fix)\n- [Compare](https://dotenv-linter.github.io/#/usage/compare)\n\n## 🚦 Continuous Integration\n\n`dotenv-linter` can also be used with CI services such as: [GitHub Actions](https://dotenv-linter.github.io/#/integrations/github_actions) and [Circle CI](https://dotenv-linter.github.io/#/integrations/circleci).\n\n## 🚧 Benchmark\n\nBenchmarking [dotenv-linter/dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) and [wemake-services/dotenv-linter](https://github.com/wemake-services/dotenv-linter) has done using the [hyperfine](https://github.com/sharkdp/hyperfine) utility:\n\n| Command                              |    Mean [ms] | Min [ms] | Max [ms] |      Relative |\n| :----------------------------------- | -----------: | -------: | -------: | ------------: |\n| `dotenv-linter/dotenv-linter .env`   |    2.7 ± 0.4 |      2.0 |      4.3 |          1.00 |\n| `wemake-services/dotenv-linter .env` | 162.6 ± 12.1 |    153.0 |    201.3 | 60.83 ± 10.20 |\n\n\u003cdetails\u003e\n\u003csummary\u003eContent of \u003ccode\u003e.env\u003c/code\u003e file used for benchmarking\u003c/summary\u003e\n\n```dotenv\n SPACED=\n\nKEY = VALUE\n\nSECRET=\"my value\"\n\nSECRET=Already defined\n\nkebab-case-name=1\nsnake_case_name=2\n```\n\n\u003c/details\u003e\n\n## ✌️ Mentorship\n\n`dotenv-linter` is not just a linter for `.env` files — it is also a **contributor-friendly open-source project** with the purpose of helping others learn Rust using a simple, but useful tool. 😊\n\nIn addition to studying Rust, this project has another goal — to **promote love for open-source**, help you with the first steps in it and give an opportunity to contribute to the open-source project written in Rust. ❤️\n\nWe act [as a mentor](https://rustbeginners.github.io/awesome-rust-mentors) within this project and **help developers** follow the path of a novice contributor from start to the top. 🤗\n\n## 🤝 Contributing\n\nIf you've ever wanted to contribute to open source, now you have a great opportunity:\n\n- [How to set up the project](/CONTRIBUTING.md#how-to-set-up-the-project)\n- [How to add a new check](/CONTRIBUTING.md#how-to-add-a-new-check)\n\n## 👍 Similar projects\n\n- [wemake-services/dotenv-linter](https://github.com/wemake-services/dotenv-linter) (Python)\n\n## ✨ Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](/CONTRIBUTING.md)].\n\n\u003ca href=\"https://github.com/dotenv-linter/dotenv-linter/graphs/contributors\"\u003e\n  \u003cimg src=\"https://opencollective.com/dotenv-linter/contributors.svg?width=890\u0026button=false\" /\u003e\n\u003c/a\u003e\n\n## ♥️ Sponsors\n\n[dotenv-linter](https://evrone.com/dotenv-linter?utm_source=github\u0026utm_campaign=dotenv-linter) is created \u0026 supported by [Evrone](https://evrone.com/?utm_source=github\u0026utm_campaign=dotenv-linter). What else we develop with [Rust](https://evrone.com/rust?utm_source=github\u0026utm_campaign=dotenv-linter).\n\n\u003cp\u003e\n  \u003ca href=\"https://evrone.com/?utm_source=github\u0026utm_campaign=dotenv-linter\"\u003e\n    \u003cimg src=\"https://www.mgrachev.com/assets/static/sponsored_by_evrone.svg?sanitize=true\"\n      alt=\"Sponsored by Evrone\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nBecome a financial contributor and help us sustain our community.\n\n\u003ca href=\"https://opencollective.com/dotenv-linter\"\u003e\u003cimg src=\"https://opencollective.com/dotenv-linter/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n## 📃 License\n\n[MIT](https://choosealicense.com/licenses/mit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotenv-linter%2Fdotenv-linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotenv-linter%2Fdotenv-linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotenv-linter%2Fdotenv-linter/lists"}