Code Monkey home page Code Monkey logo

autogen's Introduction

Build Status

autogen

Automatically generate boilerplate comments and code for new files with a single command.

Usage:

autogen -c [copyright holder] -l [license] [filename]

Modify an existing file in-place:

autogen -i [...other params as above...]

To get a list of supported licenses, or to see the full set of flags, run autogen with no parameters.

File type or language is determined based on the full filename or extension, as appropriate. See autogen for a list of recognized file types.

Sample outputs:

Editor support

For details on adding Autogen support to your editor, please see the editors directory.

Developing

To add a new file type or feature, change autogen and add several files to the testdata directory, namely:

  • testdata/<feature>.in - the input file containing command-line args to pass to autogen
  • testdata/<feature>.out - expected stdout for the test
  • testdata/<feature>.err - expected stderr for the test

To generate the *.out and *.err files automatically, just add the *.in files and run make regen. Then, examine the resulting *.out and *.err files.

Other custom tests can be added as separate scripts in the tests directory. If the file has the suffix _tests.sh, it will be automatically picked up by tests/run_all_tests.sh script, which means that make test will automatically run it without any other changes.

Be sure to also add an entry for it in tests/BUILD file for Bazel to be able to run it as well, including appropriate dependencies on any data files it may need.

Testing

You have two options:

  • via Bazel: bazel test //...
  • via Make: make test

Bazel is typically faster, especially when rerunning tests, due to built-in caching.

License

Apache 2.0; see LICENSE.txt for details.

autogen's People

Contributors

mbrukman avatar

Watchers

James Cloos avatar  avatar

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.