Граф коммитов

19 Коммитов

Автор SHA1 Сообщение Дата
Suhas Karanth d451fa03fc rename func, improve comments
- `project.go`
  - Rename method {checkCfgFilenames => checkGopkgFilenames}
  - Improve funciton comment as suggested by @sdboyer
  - Fix ambigious comment explaining rationale behind early return.
- Add comment explaining why we do not use `fs.IsCaseSensitiveFilesystem` for
  skipping following tests:
  - context_test.go#TestLoadProjectGopkgFilenames
  - project_test.go#TestCheckGopkgFilenames
  - fs_test.go#TestReadActualFilenames
2017-09-20 11:36:04 +05:30
Suhas Karanth 28f4f359fe refactor requested changes, minor improvements
- `project`
  - `checkCfgFilenames`
    - Improve function and code comments
    - Use boolean value indicating whether value was found in actual filenames.
      If manifest file was not found, return `errProjectNotFound`. Use boolean
      to determine if lock file was not found instead of length check.
  - `TestCheckCfgFilenames` - Add code comments for test cases explaining the
    expected behavior
- `fs`
  - `ReadActualFilenames`
    - Use cleaner check(`<=` ➡ `==`) to see if `names` parameter for
      `ReadActualFilenames` actually has any values.
    - Use `Readdirnames` instead of `Readdir`. This is expected to perform
      better in most cases.
  - `TestReadActualFilenames` - Add code comments for test cases explaining the
    expected behavior
- general
  - Make line length for code comments consistent(90), add periods where
    appropriate.
  - String formatting, use %q instead of '%s'
2017-09-20 11:36:04 +05:30
Suhas Karanth afaf870131 check cfg filename case on case insensitive systems
- `fs`
  - Export `IsCaseSensitiveFilesystem`. Add and run test on windows, linux and
    macOS.
  - Add function `ReadActualFilenames` to read actual file names of given
    string slice. Add tests to be run on windows and macOS.
- `project`
  - Add function `checkCfgFilenames` to check the filenames for manifest
    and lock have the expected case. Use `fs#IsCaseSensitiveFilesystem`
    for an early return as the check is costly. Add test to be run on windows
    and macOS.
- `context`
  - Call `project.go#checkCfgFilenames` after resolving project root. Add test
    for invalid manifest file name to be run on windows and macOS.
2017-09-20 11:35:54 +05:30
Ibrahim AshShohail f88c233951
dep: add NewManifest
This commit adds a constructor for dep.Manifest.

Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-08-17 09:03:41 +03:00
Jordan Krage 2fd376301e improve godoc; replace Loggers with embeded fields; refactor Ctx api 2017-06-07 08:46:44 -05:00
Sunny 4470034c1a Copy vendor/ when backing up and preserve .git
Replaces renaming with copying vendor/ while backing up. This keeps the
original vendor/ and lets SafeWriter.Write() preserve vendor/.git if
any.
2017-06-01 15:52:29 +05:30
Jonathan Stacks 98250d4333
Add a leading underscore to vendor backup 2017-05-20 10:22:09 -05:00
Sunny 47302cf1ed Rename existing vendor instead of copying
- Renames existing vendor instead of copying.
- Remove removeFile() from test helpers. No longer required.
2017-05-12 18:44:50 +05:30
Sunny 45162e5572 Backup vendor at init
- Creates backup of vendor directory, if exists with content, at init.
- Adds tests for BackupVendor() function.
- Adds RemoveFile() function to test helper.
2017-05-12 18:11:33 +05:30
Jordan Krage cbded81ec1 move Logger into Ctx; restore logging 2017-05-11 11:16:36 -05:00
Dave Cheney 1d53807754 test: move test to internal/test
Fixes #521
2017-05-11 08:57:58 +10:00
Dave Cheney 9ea8489e5e gps: move gps to internal/gps
Fixes #300
Fixes #519
2017-05-10 14:15:27 +10:00
Jordan Krage e112b2fe63 adding in-process tests 2017-05-05 18:51:26 -05:00
Kris Nova 0561ca9bfb Fix gofmt and travis
- Changes to travis.yml
 - New hack validate-gofmt.bash script
 - Fixing staticcheck in gps
 - Fixing gosimple in gps
2017-04-25 11:14:46 -06:00
Kris Nova 122ade36c3 String replacing for import paths
sed/g the following strings (somewhat blindly)
github.com/sdboyer/gps -> github.com/golang/go/gps
github.com/sdboyer/gps/internal -> github.com/golang/dep/gps/internal
github.com/sdboyer/gps/pkgtree -> github.com/golang/dep/gps/pkgtree
2017-04-21 13:39:03 -06:00
tro3 56e7772f23 Changing "Ignores" to "Ignored" 2017-04-15 20:22:59 -07:00
tro3 38bce0cc56 Adding -update test flag for golden files 2017-02-12 23:52:17 -05:00
Miguel Molina 8e957c385d rename testgo to Helper
TestgoData has been renamed to Helper and Testgo to NewHelper.
2017-01-31 14:08:27 -05:00
Miguel Molina 0acfd38c22 move command code into cmd subpackage
In this commit, the testing framework used in dep is moved to the
test package, since it's used either in dep and main.
All the code that is not part of a command has been moved to the
dep subpackage, as well as all those functions that were shared between
dep and main, since dep cannot depend on main.
Because of the movement to another package, many structs, methods and
functions have become public.
2017-01-28 01:45:37 -05:00