Skip to content

Commit

Permalink
Merge pull request #13 from kddejong/Fix/Syntax
Browse files Browse the repository at this point in the history
lint new code for adding source URL
  • Loading branch information
Chuck Meyer authored Jul 10, 2018
2 parents 37cee9f + 49c1268 commit eed81be
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/atom-cfn-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const makeIdleCallback = (work) => {

const scheduleIdleTasks = () => {
const linterAtomCfnLintInstallPeerPackages = () => {
console.log('test')
require('atom-package-deps').install('atom-cfn-lint')
}
const linterAtomCfnLintStartWorker = () => {
Expand Down Expand Up @@ -197,17 +196,17 @@ module.exports = {
const linenumberend = parseInt(match.Location.End.LineNumber, 10) - 1
const columnnumberend = parseInt(match.Location.End.ColumnNumber, 10) - 1

souce_url = "";
let sourceUrl = ''

// Rule sources are added in version 0.3.3 of cfn-lint
if (match.Rule.hasOwnProperty('Source')) {
souce_url = match.Rule.Source.toLowerCase()
if (Object.prototype.hasOwnProperty.call(match.Rule, 'Source')) {
sourceUrl = match.Rule.Source.toLowerCase()
}

toReturn.push({
severity: match.Level.toLowerCase(),
excerpt: match.Message,
url: souce_url,
url: sourceUrl,
location: {
file,
position: [[linenumber, columnnumber], [linenumberend, columnnumberend]],
Expand Down

0 comments on commit eed81be

Please sign in to comment.