$today.year is out of date

Answered

I was trying out the Copyright profile and I also set to update the copyright notice on save, but when I save my file, the auto-save modifies the year to `2021` instead of `2022`.

I used a similar copyright template:

Copyright (c) $today.year. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
Vestibulum commodo. Ut rhoncus gravida arcu.

The Regexp to detect the copyright comments: is Copyright, the Allow replacing copyright if old copyright matches: is empty.

The version I use: IntelliJ IDEA 2022.2.1 (Ultimate Edition)

0
1 comment

Can't seem to reproduce this in the same version of IDEA.

When you click 'Validate' in the profile to validate the Velocity template, is the check successful?

Try deleting the profile, removing the entire .idea/copyright directory from the project's root, restarting the IDE and creating the profile & adding copyright text again.

0

Please sign in to leave a comment.