Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer sdk bump #2

Merged
merged 3 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,17 @@ let createTestDatabase() =
|> Sql.formatConnectionString
|> ThrowawayDatabase.Create
```
Make sure you have a user with username and password called `postgres`.
Make sure you have a user with username and password called `postgres`. An easy way to do this is to run the dockerized instance of postgres set up in the `docker-compose.yml` file in the root of this repository:

```shell
repo root> docker-compose up -d
```

This will spawn a PostgresQL 12 database with the expected username and password, bound to the default port 5432. When you are done testing, this database can be destroyed like so:

```shell
repo root> docker-compose down
```

---

Expand Down
Empty file modified build.sh
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'

services:
pg:
image: postgres:12
restart: always
environment:
POSTGRES_PASSWORD: "postgres"
POSTGRES_USER: "postgres"
ports:
- "5432:5432"
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nuget Expecto 8.13.1
nuget YoloDev.Expecto.TestSdk 0.8.0
nuget Microsoft.NET.Test.Sdk 15.7.2
nuget altcover ~> 6
nuget FSharp.Analyzers.SDK 0.4.0
nuget FSharp.Analyzers.SDK 0.4.1
nuget Npgsql
nuget ThrowawayDb.Postgres
nuget Npgsql.FSharp
Expand Down
96 changes: 34 additions & 62 deletions paket.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/NpgsqlFSharpAnalyzer/SyntacticAnalysis.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Npgsql.FSharp.Analyzers

open FSharp.Analyzers.SDK
open FSharp.Compiler.SourceCodeServices
open FSharp.Compiler.Ast
open FSharp.Compiler.SyntaxTree
open FSharp.Compiler.Range

module SyntacticAnalysis =
Expand Down Expand Up @@ -58,7 +58,7 @@ module SyntacticAnalysis =
let rec readParameters = function
| ParameterTuple (name, range, func, funcRange, appRange) ->
[ name, range, func, funcRange, appRange ]
| SynExpr.Sequential(SequencePointInfoForSeq.SequencePointsAtSeq, isTrueSeq, expr1, expr2, seqRange) ->
| SynExpr.Sequential(_debugSeqPoint, isTrueSeq, expr1, expr2, seqRange) ->
[ yield! readParameters expr1; yield! readParameters expr2 ]
| _ ->
[ ]
Expand Down