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

Go rewrite #118

Merged
merged 22 commits into from
Feb 23, 2024
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
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build --action_env=CGO_ENABLED=1
34 changes: 34 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test Coverage

on: [pull_request]

jobs:
coverage:

runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.3"
# We'll come back to this later
# - name: Test Coverage
# run: ./tools/coverage.sh

# - name: Convert coverage to lcov
# uses: jandelgado/gcov2lcov-action@v1
# with:
# infile: coverage/coverage.out
# outfile: coverage/coverage.lcov

# - name: Setup LCOV
# uses: hrishikesh-kadam/setup-lcov@d100c36c45e4f64950fb746cd28713f6c756a9c1
# - name: Report code coverage
# uses: zgosalvez/github-actions-report-lcov@3b60071009dbaf817edeaa3c7226f7889a4171b8
# with:
# coverage-files: coverage/coverage.lcov
# minimum-coverage: 40
# github-token: ${{ secrets.GITHUB_TOKEN }}
# update-comment: true
15 changes: 15 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Run linting

on: [push, pull_request]

jobs:
lint:
runs-on: macos-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.3"
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Go Test

on: [push]

jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.3"

- name: Test
run: go test -v ./...
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Xcode
#
build/
bazel-*
*.pbxuser
!default.pbxuser
*.mode1v3
Expand Down Expand Up @@ -42,3 +43,4 @@ Carthage/Build
Package/Python.framework/
Package/entitlements.plist
Package/config.mk
config.mk
14 changes: 14 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("@bazel_gazelle//:def.bzl", "gazelle")

# gazelle:prefix github.com/grahamgilbert/crypt
gazelle(name = "gazelle")

gazelle(
name = "gazelle-update-repos",
args = [
"-from_file=go.mod",
"-to_macro=deps.bzl%go_dependencies",
"-prune",
],
command = "update-repos",
)
2 changes: 1 addition & 1 deletion Crypt/CryptAuthPlugin.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Crypt/CryptAuthPlugin.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions Crypt/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>4.1.1</string>
<string>5.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>229</string>
<string>257</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2021 The Crypt Project. All rights reserved.</string>
<string>Copyright © 2024 The Crypt Project. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Crypt/Mechanisms/Check.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Crypt/Mechanisms/CryptGUI.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Crypt/Mechanisms/CryptMechanism.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Crypt/Mechanisms/Enablement.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Crypt/Views/PromptWindowController.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Crypt/Views/PromptWindowController.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Crypt

Copyright 2021 The Crypt Project.
Copyright 2024 The Crypt Project.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 6 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
Loading
Loading