microsoft/azure-pipelines-vscode

False positive: DotNetCoreCLI is deprecated - Build, test and publish using dotnet core command-line

cesarcoatl opened this issue · 0 comments

vscode: 1.71.2 (system setup)
Azure Pipelines: v1.208.0

I have a project where I'm using templates located inside a subdirectory called .azure-pipelines\jobs.

my_project/
├── .azure-pipelines/
│   └── jobs/
│       ├── pr.yml
│       └── publish.yml
├── src/
│   └── my_project/
│       ├── __init__.py
│       └── example.py
└── azure-pipelines.yml

Even though I have selected Azure Pipelines as the language for publish.yml, I get the following pop-up message when I hover over TwineAuthenticate@1:

DotNetCoreCLI is deprecated - Build, test and publish using dotnet core command-line.

PowerShell

Run a PowerShell script on Linux, macOS, or Windows

And the following errors and warnings in Problems:

publish.yml [.azure-pipelines\jobs]
❌ bad indentation of a mapping entry [Ln 30, Col 16]
❌ incomplete explicit mapping pair; a key node is missed [Ln 30, Col 35]
❌ bad indentation of a mapping entry [Ln 31, Col 11]
❌ incomplete explicit mapping pair; a key node is missed [Ln 31, Col 12]
⚠️ String does not match the pattern of "^PowerShell@2$". [Ln 29, Col 9]
⚠️ Value is not accepted. Valid values: "PowerShell@2", "PowerShell@1", ..., "TwineAuthenticate@0", "TwineAuthenticate@1", ..., "DockerInstaller@0".

If I use the same task at the root azure-pipelines.yml file I get no warning, but it appears that having this task in a subdirectory is something that this extension cannot handle, even when TwineAuthenticate@1 is listed as a valid value.

publish.yml
parameters:
- name: pythonVersion
  displayName: Python Version
  type: string
  default: ''

steps:

- checkout: none

- task: UsePythonVersion@0
  inputs:
    versionSpec: ${{ parameters.pythonVersion }}
  displayName: 'Use Python ${{ parameters.pythonVersion }}'

- script: |
    python -m pip install --upgrade pip
    python -m pip install build twine
  displayName: 'Install dependencies'

- script: |
    python -m build
  displayName: 'Build package'

- script: |
    python -m twine check dist/*
  displayName: 'Check package with Twine'

- task: TwineAuthenticate@1
    displayName: Twine Authenticate
    inputs:
      artifactFeed: 'Project/Artifacts_Feed'

- script: |
    python -m twine upload --repository Artifacts_Feed --config-file $(PYPIRC_PATH) dist/*
  displayName: 'Uploading Artifact'