Search code examples
azure-pipelinessql-server-data-toolsazure-pipelines-yamlcase-sensitive

how to resolve or disable Azure Pipeline case-sensitivity warnings? Warning SQL71558


when i run a pipeline in Azure DevOps, I get hundreds of warnings of the kind :

##[warning][database name]\[schema]\Stored Procedures\load_[table123].sql(1,1): Warning SQL71558: The object reference [schema].[table123].[columnname] differs only by case from the object definition [schema].[table123].[ColumnName].

Apparently, during writing a bunch of definitions for view, stored procedures etc, I have used uncapitalised versions of column names. Functionally, everything works, it's just that I have no reference of how many acually important warnings there are, because I have hundreds of these capitalisation warnings. Is there a quick way to either

  1. Edit my View- and SP-definitions to use the correct capitalisation

or 2. Disable capitalisation checks during a Build in my Azure Pipeline

Thanks!

other places i have seen people ask this question:

  1. microsoft forum post from 2015
  2. this unhelpful blogpost

stuff i tried, but didn't work (well enough):

  1. I tried editing a bunch of view definitions manually, which does fix the warning problem,obviously, but that will take forever
  2. tried to find Azure DevOps pipeline settings to see if there's some kind of configuration available for capitalisation checks during a build (didn't find any)
  3. i'm not too familiar with how azure pipelines are built, i found a sort of pipeline definition template (?) in .yml format. I imagine it might be possible to add a line of code to that file that says something like 'capitalisation check during Build = false' or something, but i have no idea how to go about anything like that

Solution

  • After I posted, I found a solution:

    This is an issue you can solve by modifying your project file. In there you can add an extra line that disables specific checks.

    You can add it manually to your project file like the user in this post

    or I used MS Visual Studio by navigating to Project -> [Projectname] Properties -> Build -> Suppress Transact-SQL warnings. In that field I added "71558" and Ctrl+S saves the edit to the project file. Then just commit, deploy etc and your build will not execute the capitalisation check 71558