Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

format() does not change the file modification time #11

Open
ibc opened this issue Apr 27, 2017 · 0 comments
Open

format() does not change the file modification time #11

ibc opened this issue Apr 27, 2017 · 0 comments

Comments

@ibc
Copy link

ibc commented Apr 27, 2017

const clangFormat = require('gulp-clang-format');
const gulp = require('gulp');

gulp.task('format', () =>
{
	let src = 'src/**/*.cpp';

	return gulp.src(src, { base: '.' })
		.pipe(clangFormat.format('file'))
		.pipe(gulp.dest('.'));
});

Runnin the gulp format task achieves its purpose and modifies source files according to rules in .clang-format. But, the modification time of those modified files do not change.

This is annoying when you have such a file into a text editor, run gulp format in a terminal, the file is modified, but the text editor has no way to realize of it so the display is not refreshed.

As a suggestion, format() may invoke touch in modified files.

P.S.: This may be an issue of clang-format itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant