Code Monkey home page Code Monkey logo

adrs's Introduction

Tennessee Valley Beach

trophy

adrs's People

Contributors

briprowe avatar joshrotenberg avatar lbenezriravin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

adrs's Issues

enhancement(templates): support MADR and possibly custom templates

It would be cool if maybe MADR was also built in and selectable via a flag/env variable as the default, as well as pointing to a custom template. I have some basic ideas around this, but there are probably some cases that are trickier than I think they'll be (for example, supporting nested files/directories).

bug: reading the .adr-dir file has inconsistencies

I'm hoping to deprecate this in favor of something like an environment variable such as ADRS_DIRECTORY, but in the meantime, I see a bug where reading the string read from the file doesn't get the newline trimmed, and hence adrs doesn't think the directory exists. This definitely happens in the new command, so the short term fix is to trim whatever is read. This file gets read enough that the call should get abstracted out into adrs.rs at the very least.

enhancement(cmd): create a lint sub command to validate various things

Some lint ideas:

  • Lint the markdown
  • Validate that file numbering is unique.
  • Validate file names (i.e. everything should have a 4 digit id padded with zeros).
  • Validate that the .adr-dir and the ADR directory match
  • Validate that all ADRs have at least one status
  • Validate links between ADRs

enhancement(docs): create an mdbook doc site

I'd like to keep the README and in-app docs simple. There should be a more complete documentation site deployed to GitHub pages with some basic information about the tool and ADRs, and documentation and examples for all of the commands.

enhancement(adr-dir): make finding the adr-dir more intuitive

adr-tools creates the .adr-dir file on init and then uses that for subsequent runs to decide where to put/get ADRs. This works fine, and I've reproduced this behavior in adrs, but I think it would be cleaner to use a global flag tied to an environment variable, as well as just use the docs/adr as a default everywhere.

The flow would be something like this:

  • If no .adr-dir exists, and no docs/adr exists, default to docs/adr without writing a .adr-dir file
  • If the global --directory flag is set for any command, use that value for all operations, even if a .adr-dir exists.
  • If the ADR_DIRECTORY environment variable is set, use that value for all operations even if a .adr-dir exists.
  • If no .adr-dir exists but the docs/adr directory does exist, use the docs/adr directory.

I think this covers most potential situations while maintaining backwards compatibility and keeping sane defaults.

Steps off the top of my head:

  1. Add the directory flag in main.rs as a global flag, with the env marker to also pull it from the environment.
  2. Process the flag before calling the subcommand, and pass the directory value to any subcommand as a Path (or maybe PathBuf?).
  3. Change anything that uses .adr-dir now to always use that value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.