]> Sergey Matveev's repositories - gerrvim.git/blobdiff - gerrvim2json.pl
Documentation refactoring and updating
[gerrvim.git] / gerrvim2json.pl
index b38104f4382f8ccaf99011910bf4e21838c7248d..79566e047a995759807c8d73896d8278e1956f9e 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-=pod
-
-=head1 DESCRIPTION
-
-This script converts gerrvim Vim pluging temporary file to JSON suitable
-to be published in Gerrit. Input file like this:
-
-    Some main review message.
-    It can be multilined.
-
-    -----BEGIN 5e5a5d9ae9339c8f2c5405c8145e61b738953b4e Makefile 27 29-----
-    foo: bar
-        make -C some thing
-    -----END-----
-    You must replace make with $(MAKE).
-
-    And I could write it multiline too.
-
-
-    -----BEGIN 5e5a5d9ae9339c8f2c5405c8145e61b738953b4e Makefile 1 2-----
-    #/usr/bin/make
-    -----END-----
-    Remove that.
-
-is transformed to JSON like this:
-
-    {
-      "message": "Some main review message.\nIt can be multilined.",
-      "comments": {
-        "Makefile": [
-          {
-            "message": "You must replace make with $(MAKE).\n\nAnd I could write it multiline too.",
-            "range": {
-              "start_line": "27",
-              "end_line": "29"
-            }
-          },
-          {
-            "message": "Remove that.",
-            "line": 1
-          }
-        ]
-      }
-    }
-
-=head1 INPUT FORMAT
-
-Each comment to lines of some file starts with -----BEGIN----- block.
-After BEGIN word, four parts are comming (space separated):
-
-=over 4
-
-=item * Commit's hash. SHA1 in hexadecimal
-
-=item * Path to file inside repository
-
-=item * Linenumber where comment begins
-
-=item * Linenumber where comment ends
-
-=back
-
-After BEGIN goes optional text that won't be included in JSON at all. As
-a rule it is just a copy of code to be commented. It ends with -----END-----.
-
-Everything between END of one block and BEGIN of another is treated as a
-comment to the block above. Empty newlines at the end are removed.
-Optional text before the first BEGIN block is treated as overall review
-message.
-
-=cut
-
 use strict;
 use warnings;