Skip to content

Commit

Permalink
Merge pull request #2 from baronfel/analyzer_sdk_bump
Browse files Browse the repository at this point in the history
Analyzer sdk bump
  • Loading branch information
Zaid-Ajaj authored Apr 17, 2020
2 parents 3eefc0b + fab68f8 commit ca8053a
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 66 deletions.
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

0 comments on commit ca8053a

Please sign in to comment.