Giter VIP home page Giter VIP logo

copyright-inserter's Introduction

Copyright Inserter

The Copyright Inserter is a VS Code extension that adds a copyright and license header into editing files. The development was inspired by addlicense and autogen tools and comes to simplify the process of adding copyright and license into files during development by integrating with one of the most popular development environments.

The extension supports Apache 2.0, MIT, BSD, GPL 3 and Affero GPL 3 licenses.

Features

When the extension command is invoked in the editor, a copyright and license header is inserted at the top of the file. The extension captures the current language mode of the editor and uses the language configuration to decide where to insert the header and how to decorate it. The header is usually inserted into the first line. However, for language modes such as shellscript, html and xml which has mandatory declarations in the first line, the header is inserted next after the declaration line. The header is decorated using language's comment syntax. If the language has both block and line comments, the extension will use the block comments for the decoration.

The extension can be invoked by typing insert header or Copyright: insert header in the VSCode Command Palette. No key binding is defined at the moment.

Demo

Insert copyright header

Extension Settings

This extension adds the following settings into Extensions section under Copyright Inserter:

  • copyrightInserter.holder: a string describing the copyright holder. Default value is Google LLC
  • copyrightInserter.license: one of the following literals that define the copyright license: apache for Apache 2.0, bsd for BSD, mit for MIT, gpl3 for GPL version 3 and agpl3 for Affero GPL version 3. Default value is apache.
  • copyrightInserter.year: a string describing the copyright year. Default value is empty string. If the string is empty, the current year will be used.
  • copyrightInserter.useLineComment: a boolean flag to describe selection between block and line comments. Default is false.

Known Issues

None

copyright-inserter's People

Contributors

minherz avatar allight avatar hemantsachdeva avatar cirelli94 avatar picardparis avatar dependabot[bot] avatar

Watchers

 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.