crate-ci/azure-pipelines

Fix styling of azure templates

Closed this issue · 2 comments

epage commented

Currently, I am doing things in snake_case but they tend to use camelCase and PascalCase.

One question is when should we use each.

Yeah I've mulled over the discrepancy too. With predefined variables like variables['Agent.OS'], it's translated into AGENT_OS as an environment variable. We can copy that too

strategy:
  matrix:
    windows-stable:
      imageName: 'vs2017-win2016'
      rustup.toolchain: stable

Will translate rustup.toolchain into RUSTUP_TOOLCHAIN as an environment variable

I don't want to see camelCase or PascalCase as it feels wrong if one had to write RUSTUPTOOLCHAIN in scripts. It's close to unreadable (and goes against bash style guidelines).

I am fine if we want to use . as a pseudo-namespace and camelCase (or pascalCase) like:

strategy:
  matrix:
    abc:
      rustup.imageName: stable

I'm also ok with converting all variables to have underscores (even if that isn't how the samples look) to maintain readable scripts.

epage commented

Yeah, judicious use of . within camelCase names I think will be critical to keep the names readable while also not feeling out of place within Azure Pipelines. There is also talk of switching to tasks where this might be even more important. See #2 for that conversation.