Add PSScriptAnalyzer to default container.

This commit is contained in:
Matt Clay 2018-01-24 06:12:30 -08:00
parent b4fa68555d
commit cc65636a10
3 changed files with 27 additions and 0 deletions

View file

@ -49,5 +49,23 @@ RUN ln -s python2.7 /usr/bin/python2
RUN ln -s python3.6 /usr/bin/python3
RUN ln -s python3 /usr/bin/python
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
apt-transport-https \
&& \
apt-get clean
ADD https://packages.microsoft.com/config/ubuntu/16.04/prod.list /etc/apt/sources.list.d/microsoft.list
RUN curl --silent https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
dotnet-sdk-2.1.4 \
powershell \
&& \
apt-get clean
RUN dotnet --version
RUN pwsh --version
COPY requirements/sanity.ps1 /tmp/
RUN /tmp/sanity.ps1
ENV container=docker
CMD ["/sbin/init"]

View file

@ -0,0 +1,8 @@
#!/usr/bin/env pwsh
#Requires -Version 6
Set-StrictMode -Version 2.0
$ErrorActionPreference = "Stop"
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module -Name PSScriptAnalyzer

View file

@ -15,6 +15,7 @@ grep '^#!' -rIn . \
-e ':#!/usr/bin/env python$' \
-e ':#!/usr/bin/env bash$' \
-e ':#!/usr/bin/env fish$' \
-e ':#!/usr/bin/env pwsh$' \
if [ $? -ne 1 ]; then
echo "One or more file(s) listed above have an unexpected shebang."