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

📝 docs: Add pre-defined constraints in documentation #225

Conversation

rlemaitre
Copy link
Contributor

As I always struggled to remember pre-defined constraints, I added them to the mini-site.

Copy link
Owner

@Iltotore Iltotore left a comment

Choose a reason for hiding this comment

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

The list of pre-defined constraints is available in the Scaladoc. Do you find this page not helpful enough?

Nonetheless, this PR looks with just some minor changes to make.

@@ -188,3 +188,104 @@ trait RefinedTypeOps[A, C, T]:
def option(value: A): Option[T] =
Option.when(rtc.test(value))(value.asInstanceOf[T])
```

# Pre-defined constraints
Copy link
Owner

Choose a reason for hiding this comment

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

This section (and children) should have an extra # as a h1 (single #) is used for the title.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the next commit

## Global constraints

Some constraints are available for all types.
They are located in the `io.github.iltotore.iron.constraint.any` object.
Copy link
Owner

Choose a reason for hiding this comment

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

What about using [[package.name]] instead of backquotes to link it to the Scaladoc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, i'm fixing this

@rlemaitre
Copy link
Contributor Author

Do you find this page not helpful enough?

It's helpful, but I thought having all the constants in a single document may be clearer for some persons (including me 😃)

@Iltotore Iltotore merged commit 8a88093 into Iltotore:main Feb 25, 2024
1 check passed
@rlemaitre rlemaitre deleted the docs/add-pre-defined-constraints-documentation branch February 25, 2024 14:24
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