Skip to content

Commit

Permalink
Rebrand the VSIX project to NpgsqlFSharpVs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaid-Ajaj committed Aug 17, 2020
1 parent b3e1739 commit dd3e64a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 12 deletions.
8 changes: 6 additions & 2 deletions src/AnalyzerVs/NpgsqlFSharpVs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<LangVersion>8.0</LangVersion>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<RootNamespace>FSharpLintVs</RootNamespace>
<AssemblyName>FSharpLintVs</AssemblyName>
<RootNamespace>NpgsqlFSharpVs</RootNamespace>
<AssemblyName>NpgsqlFSharpVs</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<UseCodebase>true</UseCodebase>
Expand Down Expand Up @@ -72,6 +72,10 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\GettingStarted.html">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Resources\License.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
Expand Down
20 changes: 20 additions & 0 deletions src/AnalyzerVs/Resources/GettingStarted.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<h1>Getting Started</h1>

<h3>
Configure the connection string to your development database
</h3>

<p>
The analyzer requires a connection string that points to the database you are developing against. You can configure this connection string by either creating a file called <code>NPGSQL_FSHARP</code> (without extension) somewhere next to your F# project or preferably in the root of your workspace. This file should contain that connection string and nothing else. An example of the contents of such file:
</p>
<pre>
Host=localhost; Username=postgres; Password=postgres; Database=databaseName
</pre>
<p>
Remember to add an entry in your .gitingore file to make sure you don't commit the connection string to your source version control system
</p>
<p>
Another way to configure the connection string is by setting the value of an environment variable named NPGSQL_FSHARP that contains the connection string.

The analyzer will try to locate and read the file first, then falls back to using the environment variable.
</p>
5 changes: 3 additions & 2 deletions src/AnalyzerVs/Resources/License.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Copyright 2020 Asti
MIT LICENSE

Copyright 2020 Zaid Ajaj

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Binary file modified src/AnalyzerVs/Resources/ReleaseNotes.html
Binary file not shown.
2 changes: 0 additions & 2 deletions src/AnalyzerVs/paket.references

This file was deleted.

11 changes: 6 additions & 5 deletions src/AnalyzerVs/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="FSharpLintVs.ef00bfc3-a899-45fc-aae8-afecf8673aaf" Version="0.1" Language="en-US" Publisher="Asti" />
<DisplayName>F# Lint</DisplayName>
<Description xml:space="preserve">F# source code linting using FSharpLint. </Description>
<MoreInfo>https://github.com/deviousasti/fsharp-linting-for-vs</MoreInfo>
<Identity Id="FSharpLintVs.ef00bfc3-a899-45fc-aae8-afecf8673aaf" Version="1.0" Language="en-US" Publisher="Zaid Ajaj" />
<DisplayName>NpgsqlAnalyzerVs</DisplayName>
<Description xml:space="preserve">F# analyzer that provides embedded SQL syntax analysis, type-checking for parameters and result sets and nullable column detection when writing queries using Npgsql.FSharp.</Description>
<MoreInfo>https://github.com/Zaid-Ajaj/Npgsql.FSharp.Analyzer</MoreInfo>
<License>Resources\License.txt</License>
<GettingStartedGuide>Resources\GettingStarted.html</GettingStartedGuide>
<ReleaseNotes>Resources\ReleaseNotes.html</ReleaseNotes>
<Icon>Resources\logo.png</Icon>
<PreviewImage>Resources\logo.png</PreviewImage>
<Tags>fsharp, linting</Tags>
<Tags>fsharp, linting, sql, static-analysis</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0, 17.0)" />
Expand Down
2 changes: 1 addition & 1 deletion tests/NpgsqlFSharpAnalyzer.Tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let project = IO.Path.Combine(__SOURCE_DIRECTORY__, "../examples/hashing/example

let inline context file =
AnalyzerBootstrap.context file
|> Option.map SqlAnalyzer.specializedContext
|> Option.map SqlAnalyzer.sqlAnalyzerContext

let createTestDatabase() =
Sql.host "localhost"
Expand Down

0 comments on commit dd3e64a

Please sign in to comment.