sgwozdz / jenkinsfile-support

Visual Studio Code extension
MIT License
33 stars 7 forks source link

False positive - script must begin with pipeline block #47

Closed fuzzmz closed 4 years ago

fuzzmz commented 4 years ago

If in a pipeline you define global (groovy) variables then the script falsely reports that Script must begin with pipeline block.

For example, the bellow code is a valid Jenkinsfile despite the error shown by the plugin.

def SAMPLE_VAR = ''

pipeline {
    agent { label 'master' }
    stages {
        stage('build') {
            steps {
                echo 'Sample stuff'
            }
        }
    }
}
sgwozdz commented 4 years ago

Duplicated - #36 waits for release :)

sgwozdz commented 4 years ago

@fuzzmz can you confirm it works for you now ?