Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Kampfkarren/selene into roa…
Browse files Browse the repository at this point in the history
…ct_dangling_connection
  • Loading branch information
chriscerie committed Jan 7, 2024
2 parents a1c0bcd + 5637bc4 commit 51a7d1c
Show file tree
Hide file tree
Showing 11 changed files with 527 additions and 444 deletions.
845 changes: 426 additions & 419 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[workspace]
members = ["selene", "selene-lib"]
resolver = "2"

[workspace.package]
version = "0.25.0"
authors = ["Kampfkarren <[email protected]>"]
edition = "2021"
homepage = "https://kampfkarren.github.io/selene/"
license = "MPL-2.0"
repository = "https://github.com/Kampfkarren/selene"

[workspace.dependencies]
full_moon = "0.19.0"
toml = "0.7.2"

# Do not update this without confirming profiling uses the same version of tracy-client as selene
profiling = "1.0.7"
[workspace]
members = ["selene", "selene-lib"]
resolver = "2"

[workspace.package]
version = "0.26.1"
authors = ["Kampfkarren <[email protected]>"]
edition = "2021"
homepage = "https://kampfkarren.github.io/selene/"
license = "MPL-2.0"
repository = "https://github.com/Kampfkarren/selene"

[workspace.dependencies]
full_moon = "0.19.0"
toml = "0.7.2"

# Do not update this without confirming profiling uses the same version of tracy-client as selene
profiling = "1.0.7"
70 changes: 70 additions & 0 deletions misc/prepare-release.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/python3
from datetime import datetime
import os
import re
import sys

if len(sys.argv) != 2:
print("Usage: prepare-release.py <version>")
sys.exit(1)

version = sys.argv[1]

print("Updating CHANGELOG...")

with open("CHANGELOG.md", "r") as changelog_file:
changelog = changelog_file.read()

changelog = re.sub(
r"## \[Unreleased\]\((.+)\)$",
f"## [Unreleased](https://github.com/Kampfkarren/selene/compare/{version}...HEAD)\n\n"
f"## [{version}](https://github.com/Kampfkarren/selene/releases/tag/{version}) - {datetime.today().strftime('%Y-%m-%d')}",
changelog,
0,
re.MULTILINE
)

with open("CHANGELOG.md", "w") as changelog_file:
changelog_file.write(changelog)

print("Updating root Cargo.toml...")

with open("Cargo.toml", "r") as cargo_file:
cargo = cargo_file.read()

cargo = re.sub(
r"version = \"(.+)\"",
f"version = \"{version}\"",
cargo,
0,
re.MULTILINE
)

with open("Cargo.toml", "w") as cargo_file:
cargo_file.write(cargo)

print("Updating selene/Cargo.toml...")

with open("selene/Cargo.toml", "r") as cargo_file:
selene_cargo = cargo_file.read()

selene_cargo = re.sub(
r"^(selene-lib = .+version = \")(=.+?)\"",
f"\\1={version}\"",
selene_cargo,
0,
re.MULTILINE
)

with open("selene/Cargo.toml", "w") as cargo_file:
cargo_file.write(selene_cargo)

print("Running cargo check...")

os.system("cargo check")

print("------")

print("Done. Next steps:")
print("- Make and push a commit with [release]")
print("- cargo publish")
2 changes: 1 addition & 1 deletion selene-lib/src/lints/roblox_suspicious_udim2_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Visitor for UDim2CountVisitor {
then {
let args_provided = arguments.len();

if args_provided >= 4 {
if args_provided == 0 || args_provided >= 4 {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ UDim2.new(1, 1, 1, 1)
UDim2.new(a, b, c, d)
UDim2.fromOffset(1, 1)
UDim2.fromScale(1, 1)
UDim2.new()
3 changes: 3 additions & 0 deletions selene-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ If you want to stay up to date with selene itself, you can find the changelog in

## Unreleased

## [1.5.1]
- selene now works with the Luau language ID.

## [1.5.0]
- Added `update-roblox-std` and `generate-roblox-std` subcommands to vscode command palette
- Added error reporting for configuration files, both for selene.toml and for YML standard libraries.
Expand Down
4 changes: 2 additions & 2 deletions selene-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion selene-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "selene-vscode",
"displayName": "Selene",
"description": "A blazing-fast modern Lua linter written in Rust",
"version": "1.5.0",
"version": "1.5.1",
"publisher": "Kampfkarren",
"repository": "https://github.com/Kampfkarren/selene",
"engines": {
Expand All @@ -13,6 +13,7 @@
],
"activationEvents": [
"onLanguage:lua",
"onLanguage:luau",
"workspaceContains:selene.toml",
"onCommand:selene.reinstall",
"onCommand:selene.update-roblox-std",
Expand Down
1 change: 1 addition & 0 deletions selene-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export async function activate(

switch (document.languageId) {
case "lua":
case "luau":
break
case "toml":
case "yaml":
Expand Down
2 changes: 1 addition & 1 deletion selene/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ globset = "0.4.10"
lazy_static = "1.4"
num_cpus = "1.15"
profiling.workspace = true
selene-lib = { path = "../selene-lib", version = "=0.25.0", default-features = false }
selene-lib = { path = "../selene-lib", version = "=0.26.1", default-features = false }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9.16"
Expand Down

0 comments on commit 51a7d1c

Please sign in to comment.