Description
It checks .env files for problems that may cause the application to malfunction:
✅Duplicated Key
✅Incorrect delimiter
✅Key without value
✅Leading character
✅Lowercase key
✅Quote character (Will be available in v2.0.0)
✅Space character
✅Unordered Key
The key features:
⚡️Lightning-fast because it is written in Rust 🦀
💣Can be used on any project regardless of the programming language 💥
🚀Can be integrated with reviewdog and other CI services (including GitHub Actions) 🔥
Articles about dotenv-linter:
dotenv-linter alternatives and similar libraries
Based on the "Networking" category.
Alternatively, view dotenv-linter alternatives based on common mentions on social networks and blogs.
-
libcurl
A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features -
Muduo
Event-driven network library for multi-threaded Linux server in C++11 -
uWebSockets
Simple, secure & standards compliant web server for the most demanding of applications -
C++ Workflow
C++ Parallel Computing and Asynchronous Networking Engine -
cpp-httplib
A C++ header-only HTTP/HTTPS server and client library -
POCO
The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems. -
Proxygen
A collection of C++ HTTP libraries including an easy to use HTTP server. -
C++ REST SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. -
libwebsockets
canonical libwebsockets.org networking library -
cpr
C++ Requests: Curl for People, a spiritual port of Python Requests. -
RakNet
RakNet is a cross platform, open source, C++ networking engine for game programmers. -
evpp
A modern C++ network library for developing high performance network services in TCP/UDP/HTTP protocols. -
boost.beast(new repo)
HTTP and WebSocket built on Boost.Asio in C++11 -
Simple-Web-Server
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications. -
wdt
Warp speed Data Transfer (WDT) is an embeddedable library (and command line tool) aiming to transfer data between 2 systems as fast as possible over multiple TCP paths. -
PcapPlusPlus
PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, Npcap, WinPcap, DPDK and PF_RING. -
cpp-netlib
The C++ Network Library Project -- cross-platform, standards compliant networking library. -
Restbed
Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications. -
netcode.io
A protocol for secure client/server connections over UDP -
Onion
C library to create simple HTTP servers and Web Applications. -
Silicon
A high performance, middleware oriented C++14 http web framework please use matt-42/lithium instead -
Simple-WebSocket-Server
A very simple, fast, multithreaded, platform independent WebSocket (WS) and WebSocket Secure (WSS) server and client library implemented using C++11, Boost.Asio and OpenSSL. Created to be an easy way to make WebSocket endpoints in C++. -
libhttpserver
C++ library for creating an embedded Rest HTTP server (and more) -
RESTinio
Cross-platform, efficient, customizable, and robust asynchronous HTTP/WebSocket server C++14 library with the right balance between performance and ease of use -
D++
C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots! -
Seasocks
Simple, small, C++ embeddable webserver with WebSockets support -
nope.c
WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers. -
net_skeleton
Async non-blocking multi-protocol networking library for C/C++ -
verdigris
Qt without moc: set of macros to use Qt without needing moc -
IXWebSocket
websocket and http client and server library, with TLS support and very few dependencies -
tntnet
Tntnet is a web application server for web applications written in C++. -
nanoMODBUS
A compact MODBUS RTU/TCP C library for embedded/microcontrollers -
QuantumGate
QuantumGate is a peer-to-peer (P2P) communications protocol, library and API written in C++. -
Barracuda App Server
Embedded Web Server Library with Integrated Scripting Engine -
NetIF
Header-only C++14 library for getting addresses associated with network interfaces without name lookups on Windows, macOS, Linux, and FreeBSD -
LiteNetLib++
C++ lightweight and easy to use reliable UDP library for games
Collect and Analyze Billions of Data Points in Real Time
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of dotenv-linter or a related project?
README
⚡️Lightning-fast linter for .env files. Written in Rust 🦀
dotenv-linter
can [check](#-check) / [fix](#-fix) / [compare](#-compare) .env
files for problems that may cause the application to malfunction.
Available checks:
✅ Duplicated Key ✅ Ending Blank Line ✅ Extra Blank Line ✅ Incorrect delimiter ✅ Key without value ✅ Leading character ✅ Lowercase key ✅ Quote character ✅ Space character ✅ Substitution Key ✅ Trailing whitespace ✅ Unordered Key
What is a .env
file?
💡 A .env file or dotenv file is a simple text file containing all the environment variables of a project. Storing configuration in the environment variables is one of the tenets of the Manifesto of Twelve-Factor App. The .env file has a simple key-value format, for example: FOO=BAR. More information you can find in articles in English and Russian.
The key features:
⚡️ Lightning-fast because it is written in Rust 🦀 💣 Can be used on any project regardless of the programming language 💥 🚀 Can be integrated with reviewdog and other CI services (including GitHub Actions and Super-Linter) 🔥
Articles about dotenv-linter:
- [EN] Dotenv-linter: looking after the environment for you
- [EN] What's new in dotenv-linter v2.2.0?
- [EN] What are the key changes in dotenv-linter v3.0.0 release?
- [RU] Dotenv-linter: линтер .env файлов
- [RU] Что нового в dotenv-linter v2.2.1?
- [RU] Что нового в dotenv-linter v3.0.0?
👨💻 Installation
Pre-compiled binary
```shell script
Linux / macOS / Windows (MINGW and etc). Installs it into ./bin/ by default
$ curl -sSfL https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s
Or a shorter way
$ curl -sSfL https://git.io/JLbXn | sh -s
Specify installation directory and version
$ curl -sSfL https://git.io/JLbXn | sh -s -- -b usr/local/bin v2.0.0
Alpine Linux (using wget)
$ wget -q -O - https://git.io/JLbXn | sh -s
You can find other installation methods here: https://dotenv-linter.github.io/#/installation
## 🚀 Usage
#### ✅ Check
By default, `dotenv-linter` checks all `.env` files in the current directory:
```shell
$ dotenv-linter
Checking .env
.env:2 DuplicatedKey: The FOO key is duplicated
.env:3 UnorderedKey: The BAR key should go before the FOO key
Checking .env.test
.env.test:1 LeadingCharacter: Invalid leading character detected
Found 3 problems
🛠 Fix
It can also fix the found warnings with the fix
command:
$ dotenv-linter fix
Fixing .env
Original file was backed up to: ".env_1601378896"
.env:2 DuplicatedKey: The BAR key is duplicated
.env:3 LowercaseKey: The foo key should be in uppercase
All warnings are fixed. Total: 2
🤲 Compare
In addition, dotenv-linter
can compare .env
files with each other and output the difference between them:
$ dotenv-linter compare .env .env.example
Comparing .env
Comparing .env.example
.env is missing keys: BAR
.env.example is missing keys: FOO
Other use cases you can find on the documentation site (https://dotenv-linter.github.io):
🚦 Continuous Integration
dotenv-linter
can also be used with CI services such as: GitHub Actions and Circle CI.
🚧 Benchmark
Benchmarking dotenv-linter/dotenv-linter and wemake-services/dotenv-linter has done using the hyperfine utility:
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
dotenv-linter/dotenv-linter .env |
2.7 ± 0.4 | 2.0 | 4.3 | 1.00 |
wemake-services/dotenv-linter .env |
162.6 ± 12.1 | 153.0 | 201.3 | 60.83 ± 10.20 |
Content of .env file used for benchmarking
SPACED=
KEY = VALUE
SECRET="my value"
SECRET=Already defined
kebab-case-name=1
snake_case_name=2
✌️ Mentorship
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. 😊
In 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. ❤️
We act as a mentor within this project and help developers follow the path of a novice contributor from start to the top. 🤗
🤝 Contributing
If you've ever wanted to contribute to open source, now you have a great opportunity:
👍 Similar projects
- wemake-services/dotenv-linter (Python)
✨ Contributors
This project exists thanks to all the people who contribute. [Contribute].
♥️ Sponsors
dotenv-linter is created & supported by Evrone. What else we develop with Rust.
Become a financial contributor and help us sustain our community.
📃 License
*Note that all licence references and agreements mentioned in the dotenv-linter README section above
are relevant to that project's source code only.