Skip to content

Commit

Permalink
report mode corrigido
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvano Buback committed Jun 29, 2012
1 parent 7ffebe3 commit 18f778e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 64 deletions.
51 changes: 34 additions & 17 deletions Commands/Report Mode.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,51 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveModifiedFiles</string>
<key>command</key>
<string>#!/bin/bash
<key>changed</key>
<dict>
<key>command</key>
<string>#!/bin/bash
CUSTOM='--no-80chars-check --no-double_quoted_strings-check'
FORMAT="&lt;li class='%{kind}'&gt;%{path}:%{linenumber}&lt;br&gt;%{check} %{message}&lt;/li&gt;"
FILES=${TM_PROJECT_DIRECTORY:-$TM_FILEPATH}
cat &lt;&lt;EOF
&lt;html&gt;&lt;body&gt;&lt;ul&gt;
&lt;html&gt;
&lt;head&gt;
&lt;link href="file://$TM_SUPPORT_PATH/bootstrap.css" rel="stylesheet" /&gt;
&lt;/head&gt;
&lt;body&gt;&lt;table class="table table-striped table-condensed"&gt;
&lt;thead&gt;&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Kind&lt;/th&gt;
&lt;th&gt;Message&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
EOF
FORMAT="
&lt;tr class='%{kind}'&gt;
&lt;td&gt;
&lt;a class='btn btn-%{kind}' href='txmt://open?url=file://%{fullpath}&amp;line=%{linenumber}'&gt;%{filename}:%{linenumber}&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;%{kind}&lt;/td&gt;
&lt;td title='%{check}'&gt;%{message}&lt;/td&gt;
&lt;/tr&gt;"
puppet-lint $CUSTOM --log-format "$FORMAT" $FILES
cat &lt;&lt;EOF
&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;
EOF
</string>
<key>input</key>
<string>document</string>
<key>keyEquivalent</key>
<string>^~v</string>
<key>name</key>
<string>Report Mode</string>
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
<string>scope.puppet</string>
<key>scope</key>
<string>source.puppet</string>
</dict>
<key>deleted</key>
<array/>
<key>isDelta</key>
<true/>
<key>uuid</key>
<string>4C5EF528-33E5-448A-B7CB-CD0858FA1FD6</string>
</dict>
Expand Down
53 changes: 6 additions & 47 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>mainMenu</key>
<dict>
<key>items</key>
<array>
<string>1DBD7B78-91F3-4528-9AC9-B71D9E5FE445</string>
<string>------------------------------------</string>
<string>2D3C6C03-B268-42B1-A856-33FB0437B00E</string>
<string>C22C1778-E61D-40EC-8E06-4B4A5ABEC0E7</string>
<string>22538B08-D4D6-4172-B672-77893A6D8E40</string>
<string>1A1C51EE-AC6D-4F7F-A342-4D6DE1F4FAD3</string>
<string>C84524F5-B248-4A4B-87B9-69DCA93C393F</string>
<string>831FA574-7FC1-47B7-BDD3-67E3E94E8188</string>
<string>44C1B58A-0EF0-4022-A9EF-2D3B432C83FE</string>
<string>849952B4-0D8A-4B5F-996D-35D531AAAE81</string>
<string>4C76CA5D-F7F7-4354-AAAD-1F8B00D73823</string>
<string>A60AC7AD-8710-4CCB-9A52-D8B84ABDD521</string>
<string>B3E52D1C-3A49-44FA-8D1E-2910567F22C4</string>
<string>88BA23C0-A6AD-4115-A765-9074BB8C85BD</string>
</array>
<key>submenus</key>
<dict/>
</dict>
<key>name</key>
<string>Puppet</string>
<key>ordering</key>
<array>
<string>BAB15109-162D-4E1F-92F9-CA83A21169C3</string>
<string>DCFE74BF-4295-47AB-B91E-66A5761BFA96</string>
<string>13DD53A2-401B-4149-82B0-001374330B40</string>
<string>A0062DFA-F753-41C5-B48A-5DF9AA1352DD</string>
<string>AAF4E089-E3C9-4FB9-B099-FD2CCBD4E786</string>
<string>2D3C6C03-B268-42B1-A856-33FB0437B00E</string>
<string>C22C1778-E61D-40EC-8E06-4B4A5ABEC0E7</string>
<string>22538B08-D4D6-4172-B672-77893A6D8E40</string>
<string>1A1C51EE-AC6D-4F7F-A342-4D6DE1F4FAD3</string>
<string>C84524F5-B248-4A4B-87B9-69DCA93C393F</string>
<string>831FA574-7FC1-47B7-BDD3-67E3E94E8188</string>
<string>44C1B58A-0EF0-4022-A9EF-2D3B432C83FE</string>
<string>849952B4-0D8A-4B5F-996D-35D531AAAE81</string>
<string>4C76CA5D-F7F7-4354-AAAD-1F8B00D73823</string>
<string>A60AC7AD-8710-4CCB-9A52-D8B84ABDD521</string>
<string>B3E52D1C-3A49-44FA-8D1E-2910567F22C4</string>
<string>88BA23C0-A6AD-4115-A765-9074BB8C85BD</string>
<string>7AC2033D-9B16-4127-8E03-0F8AD7220920</string>
<string>285328A3-F7E4-4D5C-9175-D5EFD947C787</string>
<string>1DBD7B78-91F3-4528-9AC9-B71D9E5FE445</string>
</array>
<key>changed</key>
<dict/>
<key>deleted</key>
<array/>
<key>isDelta</key>
<true/>
<key>uuid</key>
<string>2DB168AA-8A4D-458B-B6DE-AFC8E60F845E</string>
</dict>
Expand Down

0 comments on commit 18f778e

Please sign in to comment.