From 53d5184dd8770591fe633d2c161f85ef85aefe2d Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Wed, 15 May 2024 18:37:05 +0200 Subject: [PATCH 1/2] add Vale for prose linting --- formatter.nix | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/formatter.nix b/formatter.nix index 121795a1..ab483587 100644 --- a/formatter.nix +++ b/formatter.nix @@ -46,5 +46,55 @@ ]; includes = [ "*.py" ]; }; + treefmt.settings.formatter.vale = + with pkgs; + let + vocab = "cLAN"; + style = "Docs"; + config = writeText "vale.ini" '' + StylesPath = ${styles} + Vocab = ${vocab} + + [*.md] + BasedOnStyles = Vale, ${style} + Vale.Terms = No + ''; + styles = symlinkJoin { + name = "vale-style"; + paths = [ + accept + headings + ]; + }; + accept = writeTextDir "config/vocabularies/${vocab}/accept.txt" '' + cLAN + Nix + NixOS + Nixpkgs + clan.lol + Clan + monorepo + ''; + headings = writeTextDir "${style}/headings.yml" '' + extends: capitalization + message: "'%s' should be in sentence case" + level: error + scope: heading + # $title, $sentence, $lower, $upper, or a pattern. + match: $sentence + ''; + in + { + command = "${vale}/bin/vale"; + options = [ "--config=${config}" ]; + includes = [ "*.md" ]; + # TODO: too much at once, fix piecemeal + excludes = [ + "README.md" + "docs/*" + "clanModules/*" + "pkgs/*" + ]; + }; }; } -- 2.45.2 From 36cadcb4d377556362c7fbc6468d7174dbccbff6 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Wed, 22 May 2024 13:10:54 +0200 Subject: [PATCH 2/2] fix spelling in README --- README.md | 12 ++++++------ formatter.nix | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a5e260ed..c7aa6ebb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Clan Core Repository +# Clan core repository -Welcome to the Clan Core Repository, the heart of the [clan.lol](https://clan.lol/) project! This monorepo is the foundation of Clan, a revolutionary open-source project aimed at restoring fun, freedom, and functionality to computing. Here, you'll find all the essential packages, NixOS modules, CLI tools, and tests needed to contribute to and work with the Clan project. Clan leverages the Nix system to ensure reliability, security, and seamless management of digital environments, putting the power back into the hands of users. +Welcome to the Clan core repository, the heart of the [clan.lol](https://clan.lol/) project! This monorepo is the foundation of Clan, a revolutionary open-source project aimed at restoring fun, freedom, and functionality to computing. Here, you'll find all the essential packages, NixOS modules, CLI tools, and tests needed to contribute to and work with the Clan project. Clan leverages the Nix system to ensure reliability, security, and seamless management of digital environments, putting the power back into the hands of users. ## Why Clan? @@ -14,13 +14,13 @@ Our mission is simple: to democratize computing by providing tools that empower - **Robust Backup Management:** Long-term, self-hosted data preservation. - **Intuitive Secret Management:** Simplified encryption and password management processes. -## Getting Started with Clan +## Getting started with Clan If you're new to Clan and eager to dive in, start with our quickstart guide and explore the core functionalities that Clan offers: - **Quickstart Guide**: Check out [getting started](https://docs.clan.lol/#starting-with-a-new-clan-project) to get up and running with Clan in no time. -### Managing Secrets +### Managing secrets In the Clan ecosystem, security is paramount. Learn how to handle secrets effectively: @@ -32,11 +32,11 @@ The Clan project thrives on community contributions. We welcome everyone to cont - **Contribution Guidelines**: Make a meaningful impact by following the steps in [contributing](https://docs.clan.lol/contributing/contributing/). -## Join the Revolution +## Join the revolution Clan is more than a tool; it's a movement towards a better digital future. By contributing to the Clan project, you're part of changing technology for the better, together. -### Community and Support +### Community and support Connect with us and the Clan community for support and discussion: diff --git a/formatter.nix b/formatter.nix index ab483587..bcc63c61 100644 --- a/formatter.nix +++ b/formatter.nix @@ -67,7 +67,6 @@ ]; }; accept = writeTextDir "config/vocabularies/${vocab}/accept.txt" '' - cLAN Nix NixOS Nixpkgs @@ -90,7 +89,6 @@ includes = [ "*.md" ]; # TODO: too much at once, fix piecemeal excludes = [ - "README.md" "docs/*" "clanModules/*" "pkgs/*" -- 2.45.2