Skip to content

Conversation

@alexander-yevsyukov
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 20, 2026 19:57
@alexander-yevsyukov alexander-yevsyukov self-assigned this Jan 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates project documentation by replacing informal "Please note" phrases with more concise "Note that" phrasing, and bumps version numbers across multiple configuration files and documentation.

Changes:

  • Simplified documentation language by removing "Please" prefix from note statements
  • Updated version from 2.0.0-SNAPSHOT.393 to 2.0.0-SNAPSHOT.394 across configuration files
  • Updated dependency versions (CoreJvmCompiler from .050 to .051, validation-jvm-runtime from .392 to .393)

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
version.gradle.kts Bumped validation version to .394
tests/consumer/src/test/kotlin/io/spine/validation/test/CurrencyOptionITest.kt Removed "Please" from documentation note
pom.xml Updated project version to .394 and dependency versions
jvm-runtime/src/main/kotlin/io/spine/validation/MessageValidator.kt Simplified "Please note" to "Note" in KDoc
java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceEnumField.kt Condensed and simplified documentation note
java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceBytesField.kt Condensed and simplified documentation note
java/src/main/kotlin/io/spine/tools/validation/java/JavaValidationPlugin.kt Reformatted multi-line KDoc note for clarity
docs/01-getting-started/index.md Improved line wrapping for better readability
dependencies.md Updated version references and generation timestamps
config Updated subproject commit reference
buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt Updated validation version constant to .393
buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt Updated CoreJvmCompiler versions to .051

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 22, 2026 20:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

docs/options.proto:1

  • Corrected spelling of 'please' to 'use' for consistency with the PR's goal of removing informal language like 'Please' from comments.
/*

docs/ToC.md:1

  • These link text entries still use title case capitalization ("First Validated Model", "Validation Workflow") while other entries in the same file have been updated to sentence case. These should be changed to "Your first validated model" and "Validation workflow" for consistency.
# Spine Validation — Table of contents

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings February 11, 2026 18:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings February 11, 2026 21:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 72 out of 81 changed files in this pull request and generated 3 comments.

Files not reviewed (2)
  • .idea/inspectionProfiles/Project_Default.xml: Language not supported
  • docs/_preview/package-lock.json: Language not supported
Comments suppressed due to low confidence (6)

docs/go.mod:1

  • The go directive in go.mod uses the language version format and (in typical Go tooling) should be go 1.22 rather than go 1.22.0. Using a patch version here can cause go tooling to fail parsing the module file.
    docs/_preview/go.mod:1
  • The go directive is expected to be a language version like 1.22 (major.minor). A patch version such as 1.25.6 is likely to be rejected by Go tooling; set it to the intended major.minor version instead.
    gradle-plugin/src/main/kotlin/io/spine/tools/validation/gradle/ValidationGradlePlugin.kt:1
  • Applying plugins by implementation class effectively hard-pins the plugin implementation to the version on this plugin’s classpath, which contradicts the comment about users being able to “force to a newer one”. Prefer applying by plugin ID via pluginManager.apply("com.google.protobuf") / the compiler plugin id, so the version can be resolved/overridden by the consumer’s pluginManagement (and to reduce classpath/version conflict risks).
    docs/_script/embed-code:1
  • This script hardcodes the macOS binary, while check-samples already selects Ubuntu vs macOS based on environment. If a developer runs embedCode on Linux (or CI ever uses it), the task will fail; consider selecting the binary similarly (e.g., based on $GITHUB_ACTIONS or uname).
    docs/_script/install-dependencies:1
  • Sourcing a user’s shell profile from a build script executes arbitrary, user-specific code and makes builds less reproducible (and potentially risky if run in automated environments). Prefer passing required environment via explicit variables (or an opt-in flag) and avoid sourcing shell initialization files in build automation; at minimum, quote variable expansions ("$BASH_PROFILE") to avoid word-splitting issues.
    jvm-runtime/build.gradle.kts:1
  • Switching from implementation to api makes Base.lib a transitive dependency for consumers, which can change downstream dependency graphs and potentially leak implementation details. If consumers don’t need this dependency on their compile classpath, prefer keeping it as implementation (or document why it must be exposed).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

private fun updatePluginVersion(file: File, id: String, version: String) {
val content = file.readText()
// Regex to match: id("plugin-id") version "version-number"
val regex = """id\("$id"\)\s+version\s+"([^"]+)"""".toRegex()
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex does not include the closing quote of the version literal, so replacements will leave the original trailing " in the file and can produce version "x"". Update the pattern to include the closing quote and also escape id via Regex.escape(id) to avoid regex metacharacters in plugin IDs breaking the match.

Suggested change
val regex = """id\("$id"\)\s+version\s+"([^"]+)"""".toRegex()
val escapedId = Regex.escape(id)
val regex = """id\("$escapedId"\)\s+version\s+"[^"]*"""".toRegex()

Copilot uses AI. Check for mistakes.
private fun updateKotlinPluginVersion(file: File, kotlinVersion: String) {
val content = file.readText()
// Regex to match Kotlin plugin declarations like: kotlin("jvm") version "1.9.0"
val regex = """kotlin\("([^"]+)"\)\s+version\s+"([^"]+)"""".toRegex()
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as in updatePluginVersion: the regex omits the closing quote, so the replacement can leave an extra trailing " in the file content. Include the terminating quote in the match to avoid generating invalid build.gradle.kts.

Suggested change
val regex = """kotlin\("([^"]+)"\)\s+version\s+"([^"]+)"""".toRegex()
val regex = "kotlin\\(\"([^\"]+)\"\\)\\s+version\\s+\"([^\"]+)\"".toRegex()

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +68
val updatedContent = buildFile.readText()
assertTrue(updatedContent.contains("""id("io.spine.validation") version "2.0.0-TEST""""))
assertTrue(updatedContent.contains("""id("other-plugin") version "0.1.0""""))
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These assertions would still pass even if the file ends up with a malformed version "2.0.0-TEST"" (extra quote) because they only check for substring presence. Consider asserting an exact line match (or explicitly asserting that "" does not appear) to catch the current regex replacement bug.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 12, 2026 21:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 72 out of 81 changed files in this pull request and generated no new comments.

Files not reviewed (2)
  • .idea/inspectionProfiles/Project_Default.xml: Language not supported
  • docs/_preview/package-lock.json: Language not supported
Comments suppressed due to low confidence (8)

pom.xml:1

  • protobuf-gradle-plugin is a Gradle plugin artifact and generally shouldn’t be published as a regular Maven compile dependency of this project (it will leak into consumers’ classpaths without being useful at runtime). If the goal is to support the Gradle plugin module, keep this dependency in the Gradle plugin’s build only (Gradle buildscript/plugin classpath), and remove it from the Maven POM dependencies.
    docs/_code/first-model/src/main/proto/spine/validation/docs/first_model/bank_card.proto:1
  • The regex is not anchored at the end, so it will accept strings that start with a valid-looking number but have trailing characters (despite the comment saying it must match a 16-digit number formatted exactly). Consider adding an end anchor ($) so the whole field value must match.
    docs/go.mod:1
  • Consider using the canonical go directive format (go 1.22) and keeping it consistent with the preview module’s go.mod. Using patch versions in the go directive can reduce compatibility with tooling and makes it harder to keep the docs toolchain aligned.
    docs/_preview/go.mod:1
  • The preview site’s Go version is significantly different from the docs module’s Go version and uses a patch-level directive. Aligning the Go version across docs/go.mod and docs/_preview/go.mod (and using the canonical go 1.xx format) will make Hugo Module builds more reproducible across developers/CI.
    settings.gradle.kts:1
  • This include(...) list uses :-prefixed project paths for other modules, but docs is added without the prefix. For consistency (and to avoid ambiguity in multi-project naming), consider using ":docs" here.
    docs/content/docs/validation/01-getting-started/adding-to-build.md:1
  • Correct the grammar: “base on” → “based on”.
    docs/_script/install-dependencies:1
  • Sourcing user shell init files from a build script makes builds non-reproducible and can unexpectedly execute arbitrary code (especially in CI runners or shared environments). Prefer explicitly setting required env vars in the Gradle task/CI, or at least make this opt-in (e.g., behind a flag) and quote variable expansions when checking/reading paths.
    docs/_script/embed-code:1
  • embed-code is hardcoded to the macOS binary, while check-samples selects the tool based on environment. Consider adding the same OS/CI detection here (or delegating to a shared helper) so the embedding task can run on Linux as well when needed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants